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 their unbeaten run to 18 games under head coach Lionel Scaloni. La Tri exit without a win, despite 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.
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.