"It's not meant for me. For me the national team is over. I've done all I can, it hurts not to be a champion," the 29-year-old said after defeat by Chile at the Copa America.
With Barcelona, Messi has won eight La Liga titles and four Champions Leagues.
But his only major international honour is 2008 Olympic gold.
Argentina were beaten 1-0 in the 2014 World Cup final by Germany before two Copa America final defeats by Chile on penalties. Messi was also on the losing side against Brazil in the 2007 Copa America final.
"It's been four finals, I tried. It was the thing I wanted the most, but I couldn't get it, so I think it's over," he added.