Montoya, the Colombian star who jumped from Formula One to NASCAR late last season, recovered from a bad pit stop to aggressively move from 19th to first, taking the lead when he sent Pruett's car spinning on the 72nd lap of the Telcel-Motorola 200.
"I'm very sorry about what happened with Scott," Montoya said. "I thought he saw me and when he came across I had no room to go."
Montoya said he would personally apologize to Pruett.
"Of all the people to take out - your teammate," Pruett said. "That was just lowdown, nasty, dirty driving."
Hamlin, right behind the two Chip Ganassi Racing drivers at the time, said it was a tough call.
"I wouldn't call it dirty driving, but it was a bit aggressive," Hamlin said. "Juan had the fastest car and he would have taken the lead sooner or later. He was overzealous."
Hamlin, the winner last year, pressured Montoya in the closing laps, but couldn't pass on the 2.518-mile Autodromo Hermanos Rodriguez road course's S-curves.
Boris Said finished third in the race that ended with a green-white-checker finish after a late caution. Carl Edwards was fourth, and Pruett finished fifth.
"I'm really glad we won, but really upset that we took out a teammate," said Brad Parrott, Montoya's crew chief.
Montoya, who had the dominant car for the entire race, started in third but took the lead from Pruett on the third lap.
Montoya made a green-flag stop on the 45th lap, but a fuel malfunction forced him to return to the pits about 10 laps later. After a caution, he started 19th and quickly moved his way back to the front of the field.
His victory was celebrated with deafening cheers from the 72,000-strong Mexican crowd.
The Mexican fans were hungry for a fellow Latino to win a NASCAR event in Mexico after two years in which U.S. drivers took the crown south of the border.