The final was delayed for over an hour after thousands of ticketless fans tried to enter the Hard Rock Stadium in Florida.
The contest was scoreless when Messi went to ground in the 63rd minute, seemingly feeling the effects of a strong challenge from Santiago Arias in the first half.
The 37-year-old received treatment from Argentina's medical staff before being helped to his feet and removing his right boot.
As Messi walked off the pitch, his captain's armband was removed by one of the medical staff, before he threw his boot down in frustration near the dugout.
Messi's tears turn to joy
While Nicolas Gonzalez came on in his place, Messi was left in tears on the bench after having his evening cut short due to a swollen right ankle.
Fortunately for Messi, his tears of despair turned to tears of joy after substitute Lautaro Martinez scored an extra-time winner.
Martinez's fifth goal of the tournament secured Argentina an historic 16th Copa America title, taking them past the record they previously shared with Uruguay.
It also represents Argentina's third consecutive major tournament title following their previous triumphs at the 2021 Copa America in Brazil and the 2022 World Cup in Qatar.
Scaloni praises Messi's character and determination
Messi, who struggled with a leg injury through much of the competition, created history by becoming the first player to feature in five Copa America finals.
However, his 65th-minute withdrawal represented the first time he had been substituted in a Copa America match since his debut tournament in 2007.
"Leo is the greatest player in history," Argentina boss Lionel Scaloni told reporters after the match. "He never wants to leave the pitch. He has a swollen ankle and he wants to keep on playing.
"I prefer those players and his teammates see that, that he is 30-something-years-old and he's there and he wants to contribute. He wants to play not because he is egotistical or selfish. He wants to continue playing because he doesn't want to abandon his teammates.
"He doesn't want to leave them on the pitch even when he's in that condition... He doesn't feel well when he has to leave and he was born to be on the pitch."
Messi previously indicated that he has no immediate plans to retire from international football, even though he has admitted he is making decisions over his future on a "day-to-day" basis.