Fox pinched from the blue line and scored blocker side off a pass from Artemi Panarin for a 2-1 lead at 4:01. It was his first goal since Jan. 23 (25 games).
"I found [Panarin] and I was able to be up there as the fourth guy," Fox said. "He found me, and I was able to put it in."
Panarin had a goal and an assist, and Igor Shesterkin made 29 saves for the Rangers (42-20-10). Mika Zibanejad had two assists.
New York is in third place in the Metropolitan Division. They moved within four points of the New Jersey Devils for second, and six of Carolina.
"'Shesky' kept us in that hockey game," New York coach Gerard Gallant said. "We found a way to battle back and get into it. For two periods, I didn't like the way we played."
Sebastian Aho scored, and Frederik Andersen made 14 saves for the Hurricanes (46-16-8), who clinched a berth in the Stanley Cup Playoffs after the game when the Toronto Maple Leafs won 6-2 against the Florida Panthers.
Carolina is two points ahead of New Jersey for first in the Metropolitan. It has reached the playoffs in each of Rod Brind'Amour's five seasons as coach (220-102-36).
"Their goalie made some real big saves," Brind'Amour said. "So, tip your hat. Obviously, we know that's how that team goes. Great, talented team, and they've got a good goalie."