After missing two straight matches with a right thigh injury, Messi converted a penalty in the 77th minute to pull Inter level at 1-1 then combined with Jordi Alba to put the hosts ahead in the 88th.
Telasco Segovia added a third in injury time as Miami returned to the final of the Leagues Cup, the cross-border competition featuring teams from Major League Soccer and Mexico's Liga-MX. Inter won it in 2023, Messi's first season in MLS.
"We are at a loss for words when it comes to discussing Leo (Messi)," said Javier Morales, the Inter assistant coach who was at the helm as Javier Mascherano watched from the stands serving a red card suspension.
"He trained only two or three days and then he played 90 minutes and the way he played, created situations, scoring goals."