Alex Newhook scored the tiebreaking goal with 1:33 remaining for Colorado (9-5-1), which has won five straight games. Cale Makar scored twice, Darcy Kuemper made 15 saves, and Nazem Kadri had a goal and three assists to extend his point streak to nine games (five goals, 14 assists).
"It feels great," Kadri said. "I'm dishing and they're scoring. When I'm playing with the guys I'm playing with on this team, it makes it a whole lot easier."
Coach Jared Bednar tied Bob Hartley for second-most wins (193) in Avalanche/Quebec Nordiques history, behind Michel Bergeron (265). Bednar is 193-154-40 in 387 games.
"Well, it feels good and I'll take it," Bednar said. "I'm more excited about getting the two points tonight on a night when we didn't play very well. I'd rather learn lessons while we're grabbing points than have them after losses. You identify things you need to be better at."
Filip Gustavsson made 33 saves for Ottawa (4-11-1), which is 1-7-1 in its past nine games.
"A lot of good battles, a lot of really poor decisions with the game on the line," Senators coach D.J. Smith said. "It's an unacceptable loss. We talked about not having excuses. We give up the winning goal with 1:33 to go, 100 percent on us."
The Avalanche took a 1-0 lead 50 seconds into the first period when Kadri passed through the crease to Valeri Nichushkin for a tap inside the right post.
The Senators tied 1-1 at 2:53 on Sanford's deflection of Lassi Thomson's shot from the point on a power play.
Makar made it 2-1 at 13:11 with a one-timer off a pass from Gabriel Landeskog, but Artem Zub scored with 46 seconds left in the first to tie it 2-2, shooting from the right circle off a feed from Brady Tkachuk.