Darryl Sutter was hired as Ward's replacement.
Dillon Dube scored his first NHL hat trick, and Sean Monahan and Derek Ryan each had a goal and an assist for the Flames (11-11-2), who are 3-5-1 in their past nine games. David Rittich made 29 saves.
"Feels good, but anything at this time with our division right now, I think winning is everything and that that makes it feel even better," Dube said. "If you lost the game and get that, it doesn't mean anything. To get the win with it feels really good."
Josh Norris had a goal and an assist for the Senators (8-17-1), who have lost three of four. Matt Murray allowed four goals on 11 shots and was replaced to begin the second period by Joey Daccord, who made 15 saves.
"I think just overall top to bottom we didn't come ready to play tonight, and it showed in our play," Ottawa defensemen Erik Gudbranson said. "We've got a lot more to give than that. We've got to refocus and come out and have a good game to follow this up, because those are tough ones to be a part of."
The Flames split four straight games against the Senators, the first three played on the road. (Ottawa lost 3-1 at the Montreal Canadiens on Tuesday between the third and fourth games.)
"We just beat them handily in our building (5-1 on Monday), and they come back and they were ready," Senators coach D.J. Smith said. "We weren't ready to stop and start and do all the things that we had to do or that we did the other night. They were the better team today."
Brett Ritchie made it 1-0 2:22 into game when he scored on the rush for his first goal with the Flames. It was his third game since signing as a free agent Jan. 17.