In Tuesday's last four match, the 14-time winners will play Colombia, who beat Uruguay on penalties earlier in the day.
Messi teed up goals for Rodrigo De Paul and Lautaro Martinez before firing home an injury time free-kick to cap a stunning individual performance.
The scoreline was harsh on Ecuador, who ended the game with 10 men after Pedro Hicapie's dismissal but had been competitive throughout.
Argentina made a bright start and Martinez almost opened the scoring with a moment of brilliance. He chipped the ball over goalkeeper Hernan Galindez and then volleyed goalwards, only for Robert Arboldea to block the ball on the line.
Moments later Martinez had a shot deflected wide and from the resulting corner, German Pezzella volleyed into the side netting.
Carlos Gruezo almost gifted Argentina a goal when his attempted back pass sent Messi clean through with only Galindez to beat, but the six-time Ballon d'Or winner saw his shot cannon back off the post.
Up the other end, goalkeeper Emiliano Martinez had to be alert to parry a stunning 20-yard volley by Sebastian Mendez.
Argentina had their own let off seven minutes from half-time when Pervis Estupinan crossed from the left and Enner Valencia's flicked header narrowly evaded the sliding Alan Franco at the back post.
- Messi takes control -
Two minutes later Argentina were in front, with Messi the architect. First he played in Nicolas Gonzalez on goal but when he was tackled by Galindez, Messi reacted quickest and teed up De Paul to score.
There was still time before the break for Galindez to make an incredible double save from Gonzalez, before Valencia somehow headed wide from six yards out.
After the break, Valencia remained Ecuador's most likely route back into the match and the livewire forward's near post shot hit Martinez's leg before going behind.
A wicked Estupinan cross was then almost turned into his own net by Gonzalez.
Messi came close to killing off the tie but his curled effort sailed just past the post, while Aston Villa goalkeeper Martinez denied substitute Gonzalo Plata an equaliser with a near-post block.
Inter Milan forward Martinez finally ended Ecuador's resistence six minutes from time from Messi's pass after Hincapie was caught in possession by Angel Di Maria.
And Hincapie completed a miserable few minutes as he was dismissed in injury time after dragging back substitute Di Maria when clean through, with Messi despatching the free-kick.
Ecuador lionel messi Copa America Argentina