Messi hit the post early before showing composure to find Rodrigo De Paul for his maiden international goal in the 40th minute in Goiania on Saturday.
Late on, Messi swooped on a heavy touch from Piero Hincapie to set up Lautaro Martinez ——- for his second goal in two games.
He then added one of his own with a superb free-kick.
Argentina have now extended their unbeaten run to 18 games under head coach Lionel Scaloni.
Ecuador, known as La Tri, exit without a win in spite of reaching the knockout stage.
Argentina started strong, with Martinez’s angled shot saved, while German Pezzella fired into the side-netting from a Messi corner-kick.
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 goalkeeper 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.
Messi calmly found De Paul who picked his spot after Ecuador goalkeeper 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 Martinez in the 80th minute before Messi found Martinez for an easy finish after Hincapie’s error.
Hincapie was sent off in stoppage-time for a last-man foul following a video assistant referee check, with Messi stepping up to curl home the free-kick from the edge of the box brilliantly.(dpa/NAN)