Messi scores in return for Barcelona
While Cesc Fabregas also scored twice, the atmosphere at the far-from-capacity Camp Nou only picked up with Messi's entrance as a substitute in the 64th minute.
The Argentina forward showed no after-effects from a torn left hamstring.
''I felt good in training and even if they checked me thoroughly, once you get on the field it's totally different,'' Messi said. ''Physically I felt good, I didn't feel any discomfort in my muscle.''
''I played through injury,'' Messi said of the buildup to his 59-day absence, when he was bothered by various problems. ''But I did well to get through all of this. And now I'm motivated to make this a great year.''
Messi slotted home Martin Montoya's lay-off inside the area on the stroke of stoppage time before capping a typical run through the opponent's defense with a rising shot into the back of the net moments later.
''Messi's career is like a movie script,'' Barcelona coach Gerardo Martino said. ''When you think he's down, he scores goals within just two or three minutes. His game was like a summary of his entire career here.''
Pedro Rodriguez found Fabregas inside the area with a well-placed cross to head home the ninth-minute opener, and Fabregas later doubled the advantage from the penalty spot in front of 39,299 fans at the 100,000-capacity stadium.
Barcelona was without forward Neymar because of a stomach bug. The game was watched by the team's former coach Tito Vilanova, who showed the effects of his cancer treatment.
In other last 16, first-leg matches, last-place Real Betis set aside its Spanish league woes to beat Athletic Bilbao 1-0 at home, while second-division side Alcorcon also started with a 1-0 home victory against Espanyol.
Racing Santander drew 1-1 against Almeria in a tension-filled matchup marked by player protests and the director's box being stormed by spectators.
Santander has quickly slid down the professional ranks into the third division since its relegation from topflight football two seasons ago.
Tension was high among the 1,500 fans in the El Sardinero from the kickoff when players stood idly for 20 seconds in protest at not being paid their wages for three months.
A group of spectators also attempted to confront club president Alfonso Garcia and the directors in their seats, and clashes with police followed.
At the Benito Villamarin Stadium, Betis forward Ruben Castro headed home Juanfran Moreno's long cross at the far post in the 42nd minute for the winner.
Cedric Mabwati and Joan Verdu came close as Betis controlled the first half before Athletic improved. Kike Sola marked his return from injury with the visitor's best chances, hitting a post just before stoppage time.
Dani Pacheco scored as Alcorcon continued its good run in the domestic cup competition against Espanyol, which was without coach Javier Aguirre who was serving the first of a four-game ban.
On Thursday, Real Madrid plays Osasuna and Rayo Vallecano faces Levante.
Defending champion Atletico Madrid drew 1-1 at Valencia on Tuesday.