The 32-year-old was banned for three months by CONMEBOL after criticising the South American governing body, both after the semi-final loss and a third-place play-off win over Chile in which he was sent off following an altercation with Gary Medel.
However, the Barcelona forward made a triumphant return as he scored the only goal of the game in an international friendly in Saudi Arabia.
The Manchester City striker took the spot-kick, only to fire wide from 12 yards in the 10th minute.
Two minutes later Argentina were awarded a penalty of their own when Messi was tripped by Alex Sandro.
Liverpool goalkeeper Alisson Becker saved Messi's spot-kick, but the Barcelona forward was left with a simple task to tap in the rebound.
Messi could have doubled his tally a minute before half-time when he burst clear of the Brazil defence, but Alisson stood firm to save his low effort.
Jesus and Willian both failed to work Andrada as Brazil sought an equaliser after the break, while at the other end Messi's 66th-minute free-kick had to be tipped over by Alisson.