With his side-footed goal, Messi became the second Argentine after Diego Maradona to have scored goals in the World Cup after a gap of eight years. His last goal had come in the 2006 edition in Germany.
Earlier, Bosnia-Herzegovina, playing in their first World Cup, created a forgettable record when Sead Kolasinac scored a self-goal at the third minute, the fastest in the history of the World Cup. He bettered Paraguay's Carlos Gamarra's record made in the 2006 World Cup against England.
Bosnian substitute Vedad Ibisevic pulled one back at the 84th minute to give Bosnians their first World Cup goal but couldn't stop the two-time champions from taking home all three points.
Argentine fans were seen celebrating across Rio and turned the iconic Maracana Stadium into an outpost of the blue-and-white.
Argentine coach Sabella deployed a 5-3-2 formation that paired Messi with Sergio Aguero in the attack. It was a departure from the 4-3-3 system used in the qualifying rounds, when Argentina topped the South American standings.
Messi came close to score his second in the match but his shot landed on the wrong side of the net.
Argentina have won their opening matches in the last five World Cups.
The South American side qualified for this year's World Cup with two games remaining in the qualifying rounds while Bosnia and Herzegovina topped European Group G after scoring 30 goals while conceding just six in 10 matches. Argentina and Bosnia Herzegovina have met twice earlier with the former winning both encounters.
Argentina first playing XI: 1 Romero (gk), 2 Garay, 5 Gago, 4 Zabaleta, 7 De Maria, 10 Messi (c), 9 Higuain, 14 Mascerano, 16 Rojo, 17 F Fernandez, 20 Aguero Coach: Alejandro Sabella
Bosnia and Herzegovina first playingXI: 1 Begovic (gk), 3 Bicakccic, 4 Spahic (c), 5 Kolasinac, 7 Besic, 8 Pjanic, 10 Misimovic, 11 Dzeko, 13 Mujdza, 16 Lulic, 20 Hajrovic Coach: Safet Susic
(With PTI inputs)