Mayra Pelayo and Jacqueline Ovalle goals made sure that Mexico broke their 16-game losing streak against the Americans.
Mexico has only triumphed over the US twice since 1991, the last time being in November 2010.
Although they had already advanced to the quarterfinals, the United States needed to win or draw to take first place in Group A.
In the 38th minute of the match in Carson, California, Ovalle gave Mexico the lead after lifting the ball over goalkeeper Alyssa Naeher after taking advantage of a defensive gaffe made by defender Becky Sauerbrunn.
In the second minute of stoppage time in the second half, substitute Pelayo beat Naeher with a long-range curling goal to seal the victory.
At the end of the group stage on Wednesday, the top two teams and the two best third-place finishers in each of the three groups will get a new seed.
On Saturday and Sunday are the quarterfinals, and on March 10 in San Diego, California, there will be a final for the first 12-team competition.