Gerard Pique's late strike proved insufficient for Barcelona as a Jose Mourinho-inspired Inter Milan held out for more than an hour with 10 men to seal their passage to a European Cup final for the first time since 1972.
Mourinho's side, protecting a 3-1 lead from the first leg, were reduced to 10 men following Thiago Motta's 28th-minute dismissal, but the Italians defended heroically - and at times cynically - to deny Pep Guardiola's men.
And for Mourinho, who celebrated triumphantly on the pitch at the final whistle, it was vindication following a turbulent spell in Italy and his controversial departure from Chelsea, where he was unable to deliver a repeat of his remarkable Champions League success with Porto.
Needing a 2-0 win or better to advance, Guardiola opted for an attacking 3-4-3 line-up, with Yaya Toure alongside Pique and Gabi Milito at the back.
Inter made a last-minute change with striker Goran Pandev, originally named in the starting XI, replaced by defender Cristian Chivu.
Such a move is only allowed if an injury has occurred and Inter could yet be asked to provide evidence to that effect.
As expected, Barca completely dominated the opening stages. The Catalans had around 80% of the possession early on, but Inter were organised and looking comfortable.
Xavi brilliantly turned Wesley Sneijder on the edge of the area, but was unable to set up Ibrahimovic, who was hugely disappointing, as he has been for much of his debut season for Barcelona.
Pedro then tried his luck with a shot from distance, but Barca were struggling for inspiration.
Mourinho would have been content, but the Portuguese coach was less happy as his side went down to 10 men after 28 minutes.
In his pre-match press conference Mourinho had asked for protection from the referee, while Motta had accused Barcelona of being divers.
Although those words were seen as provocative, they also turned out to be somewhat prophetic as Sergio Busquets threw himself to the ground clutching his face after Motta had pushed him in the neck.
Mourinho sarcastically applauded the decision while Barca set about taking the initiative against Inter's 10 men.
And it looked as if they might when Messi skipped past two defenders on the edge of the box and curled a venomous low shot towards the bottom corner, only to see his effort pushed superbly around the post by Julio Cesar.
Barca were camped in the Inter area for the remainder of the half, but essentially little had changed.
Mourinho's men held out until half-time and Barca knew they were in a game, even against 10 men.
Guardiola's side still needed two goals as the second period got under way and things were not getting any easier for the Catalans.
Inter were playing the offside trap to great effect and Barca were reduced to hopeful crosses to Ibrahimovic, who was showing exactly why he has failed to win over the Catalan faithful since his big-money move in the summer.
The Swede finally departed after 63 minutes, replaced by Bojan Krkic, as Guardiola looked to add some much-needed vitality to his floundering forward line.
Barca fans pleaded for a moment of divine inspiration from Messi, but the Argentinian had failed to score in six games against Mourinho sides and that statistic appeared unlikely to change as the time ticked away.
Bojan headed agonisingly wide from Messi's cross late on, but Pique ensured a rousing finale as he collected Xavi's pass in the area, left goalkeeper Julio Cesar floored with a neat touch and rolled the ball into the empty net.
There was a hint of offside, much like Inter's third goal in Milan, but the home fans hardly cared.
The noise was deafening in the final five minutes, plus four of added time, as Barca poured forward, willed on by close to 100,000 loyal fans.
Bojan lashed home in added time, but Yaya Toure was harshly ruled to have handled and Inter survived to set up a final meeting with Bayern Munich.