The 39-year-old made his 208th and final appearance for Argentina in front of a sell-out crowd of 85,000 at the Monumental, bringing an extraordinary international career to a close.
Messi addressed the supporters for almost 10 minutes after the match, admitting he did not want the moment to end as team-mates including Manchester City midfielder Enzo Fernandez were visibly moved.
“There are so many emotions going through me right now. I'm surely forgetting many things I would like to say because this is a very difficult moment for me,” Messi said.
“The first person who comes to my mind is my dad. I leave grateful, proud and at peace. Thank you for everything.”
Messi's father, Jorge, died aged 68 following a long illness, and the Benin match was the forward's first appearance for Argentina since his death.
He had announced his international retirement in August, saying the decision hurt but that the time had come. His final appearance was marked by fireworks, music, a laser show and a giant Argentina shirt bearing his number 10 and the word 'gracias'.
Messi's relationship with the national team began in 2005, when he was sent off less than a minute after coming on as a substitute against Hungary.
He went on to become one of Argentina's greatest players, winning the 2022 World Cup and two Copa America titles.
“I have nothing left to do but thank this shirt,” Messi said.
“For 20 years, even through the worst moments, I never stopped fighting, pushing forward, giving everything I had and wanting to be here.”
Messi admitted that leaving Argentina will hurt after spending two decades representing his country.
“Not coming here any more and no longer being with the Argentina national team is going to hurt a lot,” he said. “If it were up to me, I would love to be here for my entire life, because playing for Argentina is the most beautiful thing there is.”
The forward also reflected on the effort required to reach the World Cup final this summer.
“We came very close to winning it again,” Messi said. “In 2022, we had the dream of fulfilling not only my dream, but the dream of an entire country: becoming world champions again. And we did it.”
Messi's club career will continue with Inter Miami, where he is contracted through the end of the 2028 season.
