With the victory the Senators put an end to the Bruins' 11-game winning streak in Ottawa.
After a rough start, things turned around for the Senators with a solid third period effort that was spearheaded by its captain.
Spezza tied the game 2-2 early in the third, scoring from the side of the net off a pass from Karlsson at the point. It was Spezza's first goal in five games.
The goal seemed to energize the Senators and the 19,538 on hand. Anderson then made a great save on Carl Soderberg. Soderberg had a second chance and kept shoving at the puck until it crossed the line, but upon review it was clear the whistle had blown.
The Senators took their first lead of the game at 5:42 on Cowen's third of the season as he beat Rask through the legs.
Ryan's goal at the halfway mark of the period sealed the victory as he picked Reilly Smith's pocket and then beat Rask through the legs to give Ottawa a 4-2 lead.
The only downside of the period was seeing Ryan leave the game with just over three minutes remaining after taking an elbow to the head by Dennis Seidenberg. There was no penalty on the play.
The second period left much to be desired as neither team seemed overly interested in taking control of the game.
Ottawa had a terrible start to the period, giving up two goals and being outshot 13-6.
Eriksson opened the scoring at the six-minute mark as he tipped Matt Bartkowski's shot. Just over three minutes later the Bruins made it 2-0 as Marchand made his way between Zack Smith and Colin Greening and beat Anderson with a wrist shot.
The Senators salvaged the period in the final minute as Neil scored his third of the season, beating Rask to the top left corner to make it 2-1.
The Senators wrap-up their five-game homestand Sunday afternoon against the Columbus Blue Jackets.
Notes: Defencemen Patrick Wiercioch and Joe Corvo were healthy scratches for the Senators. Right-winger Erik Condra missed his sixth straight game with a leg injury … The Bruins were without defenceman Adam McQuaid who has a lower body injury and right-winger Jordan Caron was a healthy scratch.