Drake Batherson scored for Ottawa (11-19-2) as Anton Forsberg made 29 saves. Buffalo had goals from Dylan Cozens, Mark Jankowski and Alex Tuch as Michael Houser stopped 43 shots in his first start of the season.
"I thought we had lots of chances, their goalie made some good saves, and it was a weird sequence for their go-ahead goal," Batherson said.
Tied at 1-1 heading into the third, Buffalo took the lead in controversial fashion. After Erik Brannstrom laid a hit on Kyle Okposo in front of the benches, a near 10-man scrum broke out but the play was never blown dead. Jankowski would then take the puck from Josh Brown, as he looked to join the scrum, skate in and beat Forsberg at 10:03 for the game-winner.
"I looked up ice and saw a scrum was going on and kind of assumed the whistle was maybe blown and I didn't hear it, or it was blown," Brown said. "I had the puck and should have got to the red and got it in but obviously the whistle wasn't blown.
"It's a tough way to lose a game."
Tuch scored into the empty-net inside the final minute to secure the two points for Buffalo.
"I think everyone thought the whistle was going," Sens head coach D.J. Smith said. "You had a bunch of guys piling on each other in front of the bench and it was a real fluke play."
Cozens had the lone goal of the opening period as after he lost control of the puck in the offensive zone, it hit the skate of Nick Holden and fell back onto his stick where he would then fire low past an unsuspecting Forsberg for his ninth of the year at 12:07.
Batherson notched the only goal of the middle period and it came on the power play. After taking a Tim Stützle pass down low on the goal line, Batherson attempted a wraparound that was stopped but he gathered his own rebound and lofted the puck high over Houser at 7:44.
Ottawa registered a season-high 44 shots on goal but could only beat Houser once as they went 1-for-5 on the power play.
"We did a lot of really good things, probably had the most chances that I can remember, but their goalie was really good," Smith said. "Part of getting chances is that you have to score too."
Ottawa returns to the ice Thursday as they open a three-game road trip in Pittsburgh.