Martins tapped home a simple finish after a catastrophic mix-up between Arsenal goalkeeper Wojciech Szczesny and centre-half Laurent Koscielny that left the Nigerian forward with an empty net.
Nikola Zigic had headed Birmingham into the lead after 28 minutes but Robin van Persie equalised five minutes before the break with a right-footed volley.
But ArsÃƒÂ¨ne Wenger’s men failed to build on the leveller and were kept at bay by a battling Birmingham side before Szczesny and Koscielny failed to deal with Zigic’s knock-down in the 89th minute and allowed Martins to slot home in front of the Blues’ fans.
Birmingham manager Alex McLeish hailed his side’s “titanic” performance after a victory which sees his side seal a spot in next season’s Europa League.
“It’s an achievement when you consider who we were up against,” said McLeish. “We weren’t given a prayer by the pundits and the bookies but we believed. It was a titanic performance by the players.
“We had a gameplan and managed to get our noses in front, that gives you a great chance.”
Meanwhile, MartinsÃ¢â‚¬â€who is on loan from Rubin KazanÃ¢â‚¬â€admitted his winner was one of the simplest strikes he has ever scored.
“I think this is the easiest goal I’ve ever scored in my career – and it’s very important,” he said. “I’m glad I scored today and I’m glad we won. I think it was my second touch. I’m very happy.
“The gaffer (McLeish) said to me that I would come on in the second half, so I think he did it right. It means a lot to the fans and players – we really need this trophy.”
Arsenal boss Wenger, whose side once again failed to deliver when it mattered most, admitted his dismay at the result.
“I am bitterly disappointed, like the whole team,” said the Arsenal manager. “It took us a while to get into the rhythm and pace of the game.
“In the second half we were on top, unfortunately we couldnÃ¢â‚¬â„¢t score the second goal and, in the end, we made a mistake that left us no time at all to respond. We were preparing to play extra time.”
And Wenger revealed Koscielny and Szczesny were inconsolable after the final whistle. “Both of them are destroyed,” he said. “I donÃ¢â‚¬â„¢t think itÃ¢â‚¬â„¢s a good moment for me to add anything. We have to lift them up again and help them, that is what a team is about.”
MORE: Man United latest news
MORE: Arsenal latest news
MORE: Chelsea latest news
MORE: Liverpool latest news