Leeds United's Chris Wood gave the All Whites a first-half lead but second-half goals by Benfica's Raul Jimenez and Oribe Peralta sealed victory.
But the game boiled over in the dying stages when Mexico skipper Diego Reyes pulled back Michael Boxall, who then lunged at Hector Herrera.
New Zealand's Ryan Thomas also became involved and a mass brawl ensued.
Referee Bakary Gassama consulted the video assistant referee before issuing three yellow cards to Reyes, Herrera and Boxall.
Mexico head coach Juan Carlos Osorio apologised for losing his temper during the match.
The 56-year-old had a heated argument with one of New Zealand's assistant coaches after Mexico's Carlos Salcedo went down with a shoulder injury in the first half.
And the Colombian coach later had to be restrained by his own bench during the brawl in injury time.
"I would like to apologise to our fans, the way I spoke to one of their assistant coaches was not OK," he said.
"There is no place for disrespect in football and I am sorry. The game was rough, almost violent on occasion, so I lost my temper."
New Zealand's head coach Anthony Hudson played down the incident.
"I thought it was bizarre really, it was like we had elbowed the player the way it was going on," he said.
Mexico, who left striker Javier Hernandez on the bench, top the group ahead of Portugal on goals scored.
Portugal beat Russia 1-0 earlier in the day - and Mexico now only need a draw against Russia in Kazan on Saturday to be sure of reaching the semi-finals.
Hosts Russia are third in the group while New Zealand remain bottom and are out of the tournament.
Match ends, Mexico 2, New Zealand 1.
Second Half ends, Mexico 2, New Zealand 1.
Foul by Raúl Jiménez (Mexico).
Michael Boxall (New Zealand) wins a free kick in the defensive half.
Corner,  Mexico. Conceded by Stefan Marinovic.
Attempt saved. Jürgen Damm (Mexico) right footed shot from the right side of the box is saved in the bottom right corner. Assisted by Marco Fabián.
Michael Boxall (New Zealand) is shown the yellow card.
Diego Reyes (Mexico) is shown the yellow card for a bad foul.
Héctor Herrera (Mexico) is shown the yellow card.
Delay over. They are ready to continue.
Delay in match  (Mexico).
Foul by Diego Reyes (Mexico).
Michael Boxall (New Zealand) wins a free kick in the attacking half.
Attempt blocked. Raúl Jiménez (Mexico) right footed shot from the centre of the box is blocked. Assisted by Javier Aquino.
Alfredo Talavera (Mexico) wins a free kick in the defensive half.
Foul by Andrew Durante (New Zealand).
Foul by Héctor Herrera (Mexico).
Chris Wood (New Zealand) wins a free kick in the attacking half.
Attempt missed. Héctor Herrera (Mexico) left footed shot from the right side of the box is too high. Assisted by Raúl Jiménez.
Corner,  Mexico. Conceded by Stefan Marinovic.
Attempt saved. Jürgen Damm (Mexico) left footed shot from the left side of the box is saved in the bottom left corner. Assisted by Raúl Jiménez.
Ryan Thomas (New Zealand) hits the bar with a right footed shot from the left side of the box. Assisted by Michael Boxall.
Rafael Márquez (Mexico) wins a free kick in the defensive half.
Foul by Chris Wood (New Zealand).
Substitution, New Zealand. Monty Patterson replaces Dane Ingham.
Foul by Rafael Márquez (Mexico).
Dane Ingham (New Zealand) wins a free kick in the defensive half.
Corner,  Mexico. Conceded by Deklan Wynne.
Delay over. They are ready to continue.
Delay in match Marco Fabián (Mexico) because of an injury.
Jürgen Damm (Mexico) wins a free kick in the defensive half.
Foul by Deklan Wynne (New Zealand).
Attempt missed. Jürgen Damm (Mexico) left footed shot from the centre of the box is too high. Assisted by Oribe Peralta following a fast break.
Oribe Peralta (Mexico) wins a free kick in the attacking half.
Foul by Andrew Durante (New Zealand).
Attempt saved. Tommy Smith (New Zealand) header from very close range is saved in the bottom left corner. Assisted by Bill Poni Tuiloma.
Substitution, New Zealand. Kosta Barbarouses replaces Marco Rojas.
Goal!  Mexico 2, New Zealand 1. Oribe Peralta (Mexico) left footed shot from the centre of the box to the top left corner. Assisted by Javier Aquino.
Corner,  Mexico. Conceded by Michael Boxall.
Corner,  Mexico. Conceded by Deklan Wynne.
Mexico came from behind to beat New Zealand and moved top of the group amid ugly scenes at the Confederations Cup.