The Rangers had Noah Laba, Will Cuylle and Will Borgen on the ice each for more than a minute spent mostly defending before MacKinnon sliced through them to score.
"The last time I cut back before the goal I heard someone say, 'They're tired,' and that kind of gave me a little confidence, I think, that I could try something and if I mess up, I can still get it back because they're gassed," MacKinnon said. "I think it might have been 'Colts' (Ross Colton). Good call by him."
Parker Kelly scored, Martin Necas had three assists, and Mackenzie Blackwood made 24 saves for the Avalanche (20-2-6), who became the first NHL team to 20 wins this season.
Colorado had a 17-game point streak (14-0-3) end in a 6-3 loss to the New York Islanders on Thursday.
"Often you get on a run and you lose one and it sort of snowballs to two, three or four before you kind of pick yourself up," Bednar said. "But we were able to do it tonight, especially in the areas we wanted to be better at, on the checking side of things."
Artemi Panarin scored the tying goal with under a minute remaining in the third period, and Conor Sheary scored his first of the season for the Rangers (15-12-3), who have points in six of their past seven games (5-1-1). Shesterkin made 39 saves.
"I thought we played a good game," Rangers coach Mike Sullivan said. "I thought it was a really good hockey game. I thought our team played hard. I thought we were competitive all night. Obviously, we're playing against one of the better teams in the League. That was a really good game."