Messi, taking his tally to 52 in all competitions this season, netted in the 76th and 87th minutes - the second a typically brilliant solo effort - to settle an ill-tempered clash which saw Madrid defender Pepe sent off in the 61st minute.
That incident also saw Madrid coach Jose Mourinho - who on Tuesday sparked a war of words with counterpart Pep Guardiola - sent to the stands, while Barca reserve goalkeeper Jose Pinto was also shown a red card following an incident at half-time.
However, the end result means Barca, European champions in 2006 and 2009, are now firm favourites to progress to next month's final at Wembley.
Barca welcomed back captain Carles Puyol - who has been absent for all five of his side's defeats this season - but the visitors still had a number of absentees with Andres Iniesta, Eric Abidal and Adriano among the missing.
Madrid, who last week ended their three-year wait for a trophy when they beat Barca to win the Copa del Rey final, were unable to call on the suspended Ricardo Carvalho and injured Sami Khedira.
The first half was a cagey affair with Madrid content to let Barca have possession well away from danger and the visitors unwilling to commit too many men forward.
That led to Cristiano Ronaldo showing his frustration at one point as well as the home fans, and meant goalscoring chances at either end were few and far between.
Xavi tested Iker Casillas with a well-struck volley early on, while the Barca schemer also had the best chance of the opening period in the 24th minute after latching onto Lionel Messi's pass.
However, he was again denied by Spain team-mate Casillas, who blocked his low shot.
David Villa also saw a low effort go not far wide as Barca sought a valuable away goal.
At the other end, Madrid fans had to wait until just before half-time to see their side give Barca goalkeeper Victor Valdes something to think about.
Ronaldo tried his luck from 25 yards and the ball rebounded back off Valdes' chest. Mesut Ozil looked set to net as he followed up, but Valdes saved his effort and an offside flag would have ruled out any goal anyway.
As the players left the field following an increasingly niggly first half, there was a melee between the sides as they entered the tunnel that resulted in Pinto receiving a red card.
Mourinho decided to switch things at the break, taking off Mesut Ozil and sending on Emmanuel Adebayor, who scored twice here in the 4-0 quarter-final, first leg win over Tottenham.
Both sides had half-chances at the start of the second period, with Messi and Ronaldo seeing efforts blocked, before Madrid defender Sergio Ramos picked up a yellow card which rules him out of the second leg.
Much worse was to follow for Madrid though as they were reduced to 10 men when Pepe was shown a straight red card following a challenge on Dani Alves that left the Brazilian writhing in agony.
That was the fourth time in four clashes with Barca this season that Madrid have had a player sent off, and Mourinho's anger on the touchline resulted in him being sent to the stands.
Barca sensed a great opportunity to take control of the tie and almost went ahead in the 68th minute when Villa saw a shot saved by Casillas and Pedro headed the rebound inches wide.
And their next opening saw them take the lead when substitute Ibrahim Afellay did well to create space down the right and his low cross was turned in by Messi running in at the front post.
Messi was not finished and struck a brilliant second with three minutes remaining to leave Barca with one foot in the final.
The Argentina ace dribbled past several Madrid defenders at pace before sliding a right-footed shot past Casillas.