After cutting a disinterested figure in the first half, the Barcelona star came to life and scored a brilliant solo effort as his side began its World Cup campaign with a win.
An unimpressive Argentina made a winning start to its FIFA World Cup campaign, overcoming Bosnia-Herzegovina 2-1 on Sunday.
Sead Kolasinac's unfortunate own goal in just the third minute sent the South Americans on their way before Lionel Messi scored with a fine second-half effort at the Estadio do Maracana.
Substitute Vedad Ibisevic gave Bosnia hope with an 85th-minute goal, but the Europeans were unable to find an equalizer.
Messi, like his team, had been largely poor until the 65th-minute goal as Argentina, one of the tournament favorites, toiled away manfully in the Group F clash.
Alejandro Sabella would have been worried about the opening hour, but his team finished decently after Messi's second World Cup goal and first since 2006.
PHOTOS: Opening ceremony | Brazil protests | Soccer fanatics | Fan tattoos
Starting with a 5-3-2 was perhaps the biggest surprise to Sabella's Argentina lineup. Napoli forward Gonzalo Higuain was left on the bench, seemingly still yet to recover from an ankle injury.
In its first ever World Cup game, Bosnia-Herzegovina had few shocks in the starting XI with Edin Dzeko leading the line in a 4-2-3-1.
But Safet Susic's men made the worst possible start to be behind after two minutes and eight seconds.
Messi's set piece from the left was headed by Marcos Rojo, hit a stranded Kolasinac and crept past goalkeeper Asmir Begovic for the fastest own goal in World Cup history.
Izet Hajrovic almost had Bosnia level in the 13th minute, but goalkeeper Sergio Romero scrambled away after the midfielder's heavy first touch.
Despite the awful start, Susic's side looked comfortable in defense and was just lacking some polish in the attacking third.
Maxi Rodriguez blazed well over from 30 yards just after the half-hour mark for Argentina, while Javier Mascherano's effort from range forced Begovic into a save moments later.
An off-balance Dzeko tried his luck from outside the area in the 33rd minute, but he curled his left-footed shot over the bar.
A largely dull first half was brought to life four minutes before halftime.
Senad Lulic almost had Bosnia's equalizer from a Miralem Pjanic corner, only for Romero to push the header around his post in the last chance of the half.
Unhappy with his side's first half, Sabella made two changes at the break as Higuain and Fernando Gago replaced Rodriguez and Hugo Campagnaro.
But Bosnia remained on the front foot after the interval as Hajrovic struck a free kick straight at Romero from 25 yards in the 50th minute and then shot straight at him from range.
Sergio Aguero's strike from an angle lacked the power and direction to seriously trouble Begovic after he was teed up by Messi.
Messi had squandered a good free kick chance before he doubled Argentina's lead in the 65th minute.
The Barcelona star exchanged passes with Higuain, skipped past a challenge and placed his left-footed shot in off the post from the edge of the area.
Ibisevic pulled a goal back for Susic's side as he poked through Romero's legs after a fine through ball by Lulic, but Argentina held on.