Blunder hands Blues Carling Cup
Arsenal had been overwhelming favourites to end their six-year trophy drought but a mix-up between defender Laurent Koscielny and goalkeeper Wojciech Szczesny allowed Martins to secure Birmingham's first major trophy since 1963.
Birmingham, battling against relegation from the Premier League, led with a header from towering striker Nikola Zigic but Arsenal equalised through Dutchman Robin van Persie and looked poised to win the first of the four trophies they are seeking this season.
"Relatively speaking, it is the greatest moment of my career, in terms of personal achievement, when you consider the team we were up against," Birmingham manager Alex McLeish told reporters.
"For a little club like Birmingham to take on the might of Arsenal, it's fantastic. We weren't given a prayer today and think even the bookies got it totally wrong.
"I said myself that Arsenal would win nine times out of 10. But we believed. It was a titanic performance."
Arsenal manager Arsene Wenger defended his 20-year-old goalkeeper Szczesny.
"I am bitterly disappointed. I hope this won't have a negative affect on our season," Wenger said afterwards.
"You have to be positive because he is a young boy," he added.
"Hopefully, he will pick himself up and respond well (in the FA Cup replay against Leyton Orient) on Wednesday.
"When we conceded the goal there was no time for us to respond."
Arsenal, who beat Barcelona in the Champions League last week and lie second in the Premier League, had an early let-off when Zigic played Lee Bowyer through and he was wrongly flagged for offside.
Birmingham settled quicker and buoyed by their vociferous supporters carried the game to Arsenal with Bowyer, former Gunner Sebastian Larsson and Keith Fahey looking for Zigic at every opportunity.
Arsenal, missing the guile of injured skipper Cesc Fabregas, also pushed forward with Jack Wilshere, Tomas Rosicky and Samir Nasri probing for the opening.
Nasri set up Andrei Arshavin for Arsenal's first real scoring chance when the stocky forward had time to turn and shoot and Ben Foster did well to save with his feet.
Birmingham, with 6ft 8ins (2.03 metres) tall Zigic as their target man, tended to go for the high ball and the forward's aerial power brought the opener after 28 minutes when he outjumped Szczesny to head his side in front.
Arsenal responded when Van Persie headed over the bar but he was right on target 11 minutes later.
Wilshere unleashed a ferocious left-foot shot from the edge of the penalty area which smashed against the bar.
Birmingham failed to clear the danger and the ball came out to Arshavin who found Van Persie with a perfectly weighted cross for the Dutchman to volley crisply home.
Arsenal looked the more likely winners in the second half but with extra time looming Zigic flicked the ball on and Nigerian Martins, just six minutes after coming on to the pitch, took advantage of miscommunication in the Arsenal defence to stroke it into an empty net.
Martins, formerly with Inter Milan, Newcastle United and VfL Wolfsburg, only joined Birmingham in January, on loan until the end of the season.
"You can never tell with Arsenal so I was very happy to score and win the trophy," said Martins, clutching a bottle of champagne and wearing a blue hard hat given to him by a Birmingham supporter.