Messi's Inter Miami faced New England Revolution and when Messi was substituted in the 58th minute, the score was 2–2.
The Argentine contributed directly with an assist that enabled Inter Miami to take the lead, and then scored two goals in a row himself.
The hat-trick was completed in the 89th minute after a pass from teammate Luis Suárez, which Messi took care of and accurately sent into the goal. By then, Messi had scored three goals in 11 minutes.
The match ended with a 6–2 victory for Inter Miami.
Miami's win meant a new point record for the regular season in the American football league MLS, with 74 points for the team.
Messi has now scored 20 goals in 19 matches with his team. Teammate Luis Suárez has also scored 20 goals, but in 27 matches.
The team has now broken several records in the American football league and recently secured the Supporters' Shield as league champions.
It's our players who have made this season so successful. Our captain (Messi) has led us and our players have stood firm in adversity. But now, tonight, we'll celebrate, says the club's co-owner David Beckham.