The Copa America holders will face either Colombia or Uruguay in Sunday's final after they recorded a 2-0 victory in Tuesday's semi-final clash with Canada.
Manchester City's Julian Alvarez opened the scoring, before Messi scored his first goal of the tournament in the USA.
Not only did he help Argentina progress, but Messi also became the second-highest male international goalscorer of all time.
Messi, who has now scored 109 international goals, can now look forward to making his fifth appearance in a Copa America final.
Messi addresses international future
At the age of 37, Messi is aware that his playing days are coming to an end, but he still has plans to continue beyond Sunday's final in Miami.
Speaking after the win over Canada, Messi told reporters: "As I said, I will try to keep going. I try to live and enjoy the day-to-day without thinking about what will come in the future or whether I will continue or not. I have just turned 37 and only God knows what can happen."
It remains to be seen whether Messi wants to continue playing for his country until the next World Cup in the USA, Canada and Mexico in 2026.
Messi's current focus will be on helping his country win a third consecutive major tournament after lifting the Copa America in 2021 and the World Cup in 2022.
Di Maria confirms retirement plan
Last year, Di Maria revealed that he would retire from international football after the Copa America, and he has now confirmed that Sunday's showpiece event will be the final time he represents his country.
"It's my last battle," Di Maria said. "There's nothing left to say that I haven't said a lot of times before. It's my last game. I have to say thank you to all Argentinians and to this generation that has allowed me to lift so many trophies.
"I'm not ready for my last game in the national team, but it's time. Whatever happens in the final, I think I can leave through the front door. I gave everything. I always gave my life for this jersey."
Di Maria is the second-most capped Argentina player in Copa America history after he made his 27th appearance in Tuesday's semi-final success.
The attacker, who made his international debut in September 2008, has made 144 appearances for his country, scoring 31 goals and providing 32 assists.