The 38-year-old Argentine superstar forward seemed to be receiving treatment on his upper right leg or groin before he left the field on his own and walked toward the locker room.
It was later characterized as hamstring discomfort.
"He felt some discomfort, and we won't know how serious the injury is until tomorrow," coach Javier Mascherano stated after the match.
"There might be something there. Perhaps not too serious, as he wasn't in significant pain. But he did feel a pull."
Messi took the ball and dribbled into the Necaxa defense, but he stumbled at the edge of the box and collided with Necaxa defender Alexis Pena, then fell to the ground, hitting the pitch in frustration as the ball was cleared.
Shortly after, Herons captain Messi was alone near midfield on the left wing when he fell to the ground in a seated position, lying on his back briefly until trainers arrived.
Inter Miami manager Javier Mascherano decided to substitute Federico Redondo for Messi.
During the Argentine World Cup qualifiers in March, Messi dealt with thigh strain issues.
Messi has netted 18 goals and provided nine assists in 18 MLS matches this season.
He assisted on both Inter Miami goals in a 2-1 win over Atlas on Wednesday in their opening match of the Leagues Cup, a tournament featuring MLS and Mexican League teams.
Miami will wrap up group stage play in the event on Wednesday against Pumas.
Messi guided Inter Miami to the first Leagues Cup title in 2023 shortly after joining the MLS club.