The Barcelona superstar created the third-minute own goal by Sead Kolasinac with which Argentina went ahead, but it took a mid-match tactical shift for him to really start influencing proceedings.
In the 65th minute he scored a goal befitting of the iconic 78,800-seater stadium, collecting the ball deep and exchanging passes with Gonzalo Higuain before darting past a pair of defenders and slamming home via the base of the left-hand post.
With tournament debutants Bosnia likely to be Argentina's strongest rivals for group supremacy, Alejandro Sabella's side are firmly on course to reach the last 16 ahead of further games against Iran and Nigeria.
Victory was raucously celebrated by the swathes of blue and white-clad fans who had swept into Rio and turned the Maracana -- overhauled for the World Cup -- into an outpost of Buenos Aires, but it was far from straightforward.
More From This Section
With Higuain still troubled by an ankle injury, Sabella elected to deploy a 5-3-2 formation that paired Messi with Sergio Aguero in attack.
A free-kick wide on the left gave the Argentina captain a chance to bend a cross into the box and although Marcos Rojo made only glancing contact, the ball cannoned into the net off the unfortunate Kolasinac.