The two came together during the 37th minute of the third-place play-off in the Copa America, with the Besiktas midfielder pushing the Barcelona attacker several times with his chest and going face to face with the 32-year-old.
The referee sent both off after consulting with VAR.
Argentina had led 2-0 at the time of the incident, with Sergio Aguero and Pablo Dybala scoring for them, the former benefiting from a Messi assist. They held on to win a scrappy affair 2-1.
It was only the second red card of Messi's career, the first also coming while playing for Argentina on his debut against Hungary in 2005.
The referee also showed seven yellow cards in a match that was broken up with 37 fouls.
Hosts Brazil face Peru in the final on Sunday in Rio de Janeiro.