Messi bursted onto the scene after a quiet first hour as he dribbled past defenders in majestic fashion to double the Argentine lead in 65th minute, firing a left-footer from the box, that hit the left post before finding the net. (Agencies)
It took 26-year-old Messi eight years and 623 match minutes to earn his second World Cup goal, the first one coming in 2006 against Serbia Montenegro.
Debutantes Bosnia made a forgettable start as the conceded the fastest own goal in World Cup history in just two minutes and eight seconds but impressed as the game wore on with their fantastic defence, specially the way they managed to stifle Messi for most of the part.
A change of tactics in the second half revived Argentina, who had gone with a 5-3-2 formation but resorted back to 4-3-3.
Substitute Vesad Ibisevic had the honour to score Bosnia's first ever World Cup finals goal, five minutes from the whistle, when he shot the ball in as Argentine goalkeeper Sergio Romero approached and failed to block.
At Porto Alegre, Karim Benzema hit a brace in France's 3-0 win over 10-man Honduras in a Group E game, where goal-line technology made its debut.
At the start of the second half, a volley from Benzema, who had put his side ahead with a penalty conversion, hit post and bounced back into the area. Honduras goalkeeper Noel Valladares tried to pull the ball out but referee Sandro Ricci declared it an own-goal after employing the new technology.
Winston Palacios was handed a red card after two fouls on on Paul Pogba. Benzema scored his second goal in the 72nd minute from a difficult angle.
Earlier, in Group E opener at Brasilia, Substitute Haris Seferovic smashed home a winner in dying moments to seal a dramatic 2-1 win for Switzerland over Ecuador.
It was a nightmarish start for debutantes Bosnia as Sead Kolasinac's own goal, third of the tournament so far, handed Argentina lead in as early as third minute.
Messi fired a free-kick from the left, Marcos Rojo jumped for a header but missed the ball, which brushed Kolasinac's shin before crashing into the net.
But the first-timers recovered well and played solid defence game, not letting the likes of Messi, Maxi Rodriguez and Angel Di Maria dominate at refurbished Maracana Stadium.
They stifled dangerous Messi with some intelligent marking as they caged the Barcelona star with a triangle of tacklers around him.
Bosnia also impressed with their resolve and ability to play engaging football. They had a good chance to equalise but the pass from Zvjezdan Misimovic went to a forward, who was not in a great position.
Five minutes before the break, Argentina keeper Argentina Sergio Romero made a great save as Bosnia threatened from a set-piece. Senad Lulic headed the corner but Romero gets down in time to push the ball away.
Seconds before the break, Messi swung into action as he beat three players in his usual charismatic style but did not get any support on his left.
Argentina changed tactics instantly after the break as they replaced Hugo Campagnaro and Rodriguez for a 4-3-3 formation as against 5-3-2. The ball moved more freely after this.
Messi then finally exploded to the scene in the 65th minute. Running from right to left, Messi got a pass from Gonzalo Higuain and moved across the box, beat two defenders and fired a low shot that hit post before deflecting into the post.
Messi bursted onto the scene after a quiet first hour as he dribbled past defenders in majestic fashion to double the Argentine lead in 65th minute, firing a left-footer from the box, that hit the left post before finding the net.