Messi hit the post early before showing composure to find Rodrigo De Paul for his maiden international goal in the 40th minute.
Late on, Messi swooped on a heavy touch from Piero Hincapie to set up Lautaro Martinez for his second goal in two games, before adding one of his own with a superb free-kick.
Argentina extends its unbeaten run to 18 games under head coach Lionel Scaloni. La Tri exits without a win, despite reaching the knockout stage.
Argentina started strongly, with Martinez's angled shot saved, while German Pezzella fired into the side-netting from a Messi corner.
Ecuador had a major let-off in the 23rd minute following Carlos Gruezo's error which allowed Messi in one-on-one, only to shoot into the upright.
Jhegson Mendez tested Argentine keeper Emiliano Martinez with a thunderous volley and Enner Valencia glanced a header off target as Ecuador offered some threat in an open game.
But Argentina took the lead in the 40th minute with Messi calmly finding De Paul who picked his spot after Ecuador keeper Hernan Galindez raced off his line to clear a through-ball.
Valencia flicked a header wide on half-time, while the Fenerbahce forward also hit the post early in the second half from a tight angle.
Argentina sat back in the second half, with Gonzalo Plata testing Emiliano Martinez in the 80th minute before Messi found Lautaro Martinez for an easy finish after Hincapie's error.
Hincapie was sent off in stoppage-time for a last-man foul after a VAR (video assistant referee) check, with Messi stepping up to curl home the free-kick from the edge of the box brilliantly.