Hordes of Argentina fans helped transform Rio's famous Maracana Stadium into a corner of Buenos Aires as the South American giants eased past their Group F rivals.
Messi, hoping to secure his status as one of footall's greats by shining at this World Cup, had a largely quiet game by his high standards.
But the diminutive striker provided the two decisive moments of the match for Argentina's goals.
Messi's teasing free-kick caused panic in the Bosnian defence after only two minutes and eight seconds, when the ball came off Sead Kolasinac's legs and went into his own net, the fastest own goal in World Cup history.
On 65 minutes Messi electrified the 78,800-capacity stadium with a moment of magic, jinking towards the area and unleashing a low shot which flew past Asmir Begovic in the Bosnian goal.
The only blemish for Argentina was a late goal from Bosnian substitute Vedad Ibisevic, who slid his shot below the advancing Sergio Romero.
"The second goal secured the three points and was special for me for the game I was having," said Messi, who failed to score at the 2010 World Cup.
"Everyone was anxious to do well. The result was the most important."
The win puts Argentina on course for the last 16 with games against Iran and Nigeria to come.