The 38-year-old was pictured signing the deal at the construction site of the club's new stadium, where he will play next season.
Messi, who earns approximately $20m annually, remains crucial to Inter Miami's success, having won the league's MVP and Golden Boot last season.
Inter Miami manager Javier Mascherano highlighted Messi's competitiveness and his importance in translating that drive to the team.
Messi has yet to decide on his participation in the 2026 World Cup for Argentina, stating he will assess his physical condition closer to the tournament.