Phil Neville's Inter has now claimed eight points from its past four games, having been rooted to the bottom of the Eastern Conference after six defeats in a row.
Nashville had taken the lead early in the second half from Charles Sapong but Miami responded on the hour mark.
Ex-France international Blaise Matuidi played in former Real Madrid forward Higuain who calmly collected the ball and slotted home for 1-1.
Inter dramatically claimed all three points in the 95th minute when Gonzalo's brother Federico Higuain whipped in a well-weighted cross for Indiana Vassilev to head home.
The win moves Miami out of last spot in the east and up to 12th.
At the other end of the conference table, New England Revolution moved 10 points clear with a 2-1 home win over Philadelphia Union.
Matthew Polster and Gustavo Bou netted first-half goals, sandwiching Paxten Aaronson's strike to extend New England's unbeaten run to six games.
Bou's goal came after his 39th-minute penalty was saved by Union goalkeeper Andre Blake, only for the Argentine to convert the rebound.
New York Red Bulls are winless in six after going down 2-1 to lowly Chicago Fire following Serbian midfielder Luka Stojanovic's early double strike.
DC United came from behind to win 2-1 over Montreal, while San Jose Earthquakes beat LAFC 2-1 in the Western Conference.
LA Galaxy were held to a 1-1 home draw by Vancouver Whitecaps with Kevin Cabral's 32nd-minute goal cancelled out by Ranko Veselinovic's 50th-minute reply.