Messi missed Argentina's previous four matches due to a suspension for accusing CONMEBOL of favouring hosts Brazil – who won their semi-final meeting – at the Copa America and he made a decisive impact in the friendly, billed as the Superclasico de las Americas, as the Selecao's winless streak reached five games.
The five-time Ballon d'Or winner earned Argentina an early penalty and netted at the second time of asking after Gabriel Jesus had also spurned an opportunity from 12 yards.
Another couple of chances were crafted for Messi, but he failed to add to his tally and the match became extremely scrappy and disjointed after the break, with clear-cut chances at a premium.
A ferocious start saw both sides awarded a penalty inside the first 12 minutes and remarkably neither of them were scored, with Jesus missing the target after being tripped by Leandro Paredes, before Messi had his saved by Alisson.
But luckily for Argentina and the returning Messi, Alisson put the ball right back into the danger zone and the Barcelona star buried the rebound.
Messi went close to a second in rather more characteristic fashion, as he dribbled from inside his own half and got a shot away from the edge of the box, but his effort was a little tame and Alisson stopped it easily.
The second half was significantly untidier, though Argentina still looked more threatening, with Messi's long-range free-kick forcing Alisson to tip it over.
Lautaro Martinez should have wrapped things up 10 minutes from time when he blazed over inside the area, though Brazil – who handed Rodrygo Goes and Wesley debuts from the bench – were unable to punish the let-off and Argentina claimed victory.
What does it mean? Issues remain for incoherent Brazil
Since winning the Copa America, Brazil have been thoroughly underwhelming. With Friday's defeat, they have not won any of their five matches since lifting the trophy in July.
The most alarming element of the Selecao's performance was the anonymity of their attackers. Jesus struggled, Roberto Firmino offered precious little and Willian's impact amounted to little more than a couple of mazy runs that came to nothing.
Alisson one of few to match expectations
It was one of those games where there were not many standout performances to choose from. Alisson at least performed as well as one might expect, saving Messi's penalty – albeit parrying it straight back to him – and producing seven stops in total.
Jesus struggles to impose himself
Although he won Brazil's penalty, there was little to be impressed about in Jesus' display. He failed to hit the target with his spot-kick, while he was unable to make much of an impact up against Nicolas Otamendi and German Pezzella.
It is on to Abu Dhabi next for Brazil, as they face South Korea on Tuesday. Argentina are scheduled to be in action against Uruguay in Tel Aviv, Israel the day before. However, La Celeste are yet to confirm their participation after a recent escalation in tension in nearby Gaza.