Messi set up Papu Gomez's sixth-minute opener, before scoring a penalty and adding a second just before half-time to extend his record goals tally to 75.
Elsewhere, Manchester United striker Edinson Cavani scored a 21st-minute penalty as Uruguay beat Paraguay 1-0.
Inter Milan's Lautaro Martinez also scored in Argentina's win and the team are now unbeaten in their last 17 games.
They take on Ecuador in the quarter-finals on Sunday, while Uruguay play Colombia on Saturday.
Hosts Brazil play Chile, while Paraguay face Peru.