The straight red card marked the first time the Barcelona forward has been sent off in a senior game for club or country since his debut with the national team in 2005.
With Argentina up 2-0, Messi put in a hard challenge on Medel who was shepherding the ball out of play.
The two players then aggressively bumped chests a number of times before the match referee intervened and immediately flashed reds for both.
ESPN reports that confusion ensued, with players from both teams surrounding the referee. But moments later, Messi and Medel walked off the field.
Sergio Aguero and Paulo Dybala had scored the goals for Argentina.
Arturo Vidal converted a penalty for Chile just after half-time.
Hosts Brazil face Peru in the final on Sunday in Rio de Janeiro.