The game seemed destined for overtime when Ryan McDonagh followed the puck into the left corner and sent a backhand pass toward the slot with the clock down to the last 2 seconds.
But Richards, standing alone to the right of the net, one-timed the feed past Mike Smith. The goal was initially waved off, but a video review determined the puck crossed the goal line with 0.1 second remaining, giving New York the victory.
Marian Gaborik scored twice, including a score-tying unassisted tally 1:09 into the final frame, and the Rangers broke a two-game losing streak.
Martin Biron turned aside 21-of-23 shots to earn the victory.
Lauri Korpikoski notched a short-handed goal and Cal O'Reilly added a power-play goal for the Coyotes.
Smith ended with 27 saves.