Stafford also had two assists in helping the Sabres rally from a two-goal deficit, and overcome the loss of co-captain Chris Drury, who left the game in the second period with a deep cut across his forehead.
Drury, who also scored, was hurt after being blind-sided by Ottawa's Chris Neil - a hit that sparked a wild melee that involved all 12 players on the ice.
Thomas Vanek scored twice, including his 31st of the season, while Clarke MacArthur and Dmitri Kalinin also scored in a game in which the banged-up Sabres opened already missing seven regulars.
Dany Heatley scored twice and added an assist, while Jason Spezza had a goal and two assists. Daniel Alfredsson and Mike Fisher had a goal and assist each.
Stafford, taking the fourth shootout attempt, scored when he faked going to his forehand and flipped a backhander past Martin Gerber.
Ryan Miller then sealed the win when he gloved Fisher's attempt. Miller's best save came a shootout attempt earlier, when he got his blocker out to foil Mike Comrie, who appeared to have the goalie going the wrong way.
The Eastern Conference-leading Sabres (41-15-5) completed their six-game homestand with a 5-0-1 record, and have won eight of their past 10 (8-1-1).
Ottawa had a five-game win streak snapped in a game in which both teams squandered two-goal leads.
The action was marred by an ugly second period, the fighting beginning shortly after Drury was hurt. Drury had just snapped a shot on net from the right circle when Neil, without slowing, hit him from behind. Neil's shoulder caught Drury across the side of the head, but was not penalized for the hit.
The melee began after the ensuing faceoff, sparked when Buffalo's Adam Mair punched Spezza in the head.
All 10 players then squared off, while Buffalo goalie Martin Biron skated to centre, where he was met by Ottawa's Ray Emery. Both traded several punches before Peters took on Emery, landing several heavy blows.
The game was delayed for about 20 minutes while officials issued 100 minutes in penalties, including 63 against Buffalo. Emery and Biron were ejected, as was Peters.
The Northeast Division rivals meet again at Ottawa on Saturday, wrapping up their eight-game season series.
The Sabres, who overcame a 2-0 deficit, appeared to take control three minutes into the third period, when Kalinin made it 5-3, converting his own rebound.
The Senators rallied when Spezza and Fisher scored goals 2:36 apart, tying it at five with nine minutes left.
Emery, who allowed three goals on 15 shots, was back after serving a three-game suspension for slashing Montreal's Maxim Lapierre. Biron allowed two goals on 18 shots before he was ejected.
Notes: Ottawa coach Bryan Murray, fresh off winning his 600th career game, coached his 1,200th, most among active coaches and sixth all-time. ... Before the game, Sabres GM Darcy Regier said despite the team's injuries, Buffalo is still handcuffed by the salary cap in its ability to make any trades leading up to next week's deadline. ... Sabres RW Patrick Kaleta, a Buffalo-area native, had an assist in his NHL debut, a day after being called up from the minors to replace Daniel Paille (broken finger).