Wambach tallied three times in the first 29 minutes to break Hamm's mark of 158 international goals, and she added another in injury time to give her a nice round number.
The historic 159th came on a line-drive header that ripped into the twine in the back of the net off a corner kick by Megan Rapinoe.
The 33-year-old Wambach turned and ran a couple of steps in the direction of the U.S. bench, then stopped as Rapinoe jumped into her arms. The Rochester, N.Y., native was then mobbed by teammates on the field and those who streamed off the bench as the crowd at Red Bull Arena cheered wildly.
After the hugs, Wambach turned to the stands and blew a kiss toward her parents, Judy and Peter.
Chants of "Ab-bee, Ab-bee, Ab-bee," cascaded through the stadium as officials got the ball and gave it to the U.S. bench.
"I'm just so proud of her," Hamm said. "Just watching those four goals, that's what she is all about. She fights for the ball, she's courageous and she never gives up. Her strength and perseverance is what makes her so great and it's what defenders and opposing teams fear.
"From being her teammate early in her career, I know all she ever wanted to do was win, and she continues to do that. I'm just glad I got to share 158 with her. It was short, but it was fun."
Her first goal Thursday came on a shot in the box past South Korean goalkeeper Kim Jung-mi in the 10th minute. The second came nine minutes later in the friendly on a flicking header.
Lauren Cheney set up the first two goals on crossing passes on plays that Wambach eluded Korean defender Shim Seo-yeon.
Wambach's fourth goal was an easy tap-in after Alex Morgan made a run down the right side and centred the ball to the on-rushing Wambach, the 2012 FIFA Women's World Player of the Year.
Wambach had a chance for a fifth goal, which would have tied her single-game record, but she could not get her head on a cross early in the second half.
Wambach was given a standing ovation by many in the crowd when she was replaced in the 58th minute by Christen Press.
Before leaving the field, she exchanged hugs with long-time teammates Rapinoe, Heather O'Reilly and Carli Lloyd and a few other players. As she got to the sideline she applauded the crowd and then hugged her coaches and teammates.
Wambach said on Tuesday she wanted to get the record and stop being the centre of attention. On Thursday night she held the spotlight and no one was going to take it away.