William Nylander and Michael Bunting scored, and Radim Zohorna also scored in his debut for the Maple Leafs (45-20-10), who are 2-0-1 in their past three games.
Toronto remained four points ahead of the Tampa Bay Lightning for second in the Atlantic Division. Tampa Bay clinched a berth in the Stanley Cup Playoffs after defeating the New York Islanders 5-0 on Saturday.
Mads Sogaard allowed three goals on 16 shots before leaving after the second period because of an illness for the Senators (37-34-5), who had won three of four (3-1-0). Cam Talbot made four saves in relief.
"Another night where hard work should get rewarded," Ottawa captain Brady Tkachuk said. "It's not the outcome we wanted, of course, but everyone left it all out there, so you definitely take some pride in that."
The Senators fell six points behind the Florida Panthers for the second wild card into the playoffs from the Eastern Conference. Florida defeated the Columbus Blue Jackets 7-0 on Saturday.
"It's been a battle with the amount of guys that have gone out," Ottawa coach D.J. Smith said of the team's lengthy injury list, which includes defensemen Thomas Chabot and Jakob Chychrun, forward Josh Norris and goaltender Anton Forsberg. "I can't fault the guys. They gave everything they had tonight. It's that simple. And we'll do that again tomorrow (at the Blue Jackets), and we'll do it every game until they tell us we can't play."
Bunting gave the Maple Leafs a 1-0 lead at 1:23 of the second period. He controlled a loose puck near the left hash marks, turned and shot glove side on Sogaard.
"We battled hard all game," Senators defenseman Nick Holden said. "Came out and had a really good first period. I think they did a pretty good job getting pucks behind us, and we didn't break out as good in the second period and gave them some chances, and they obviously capitalized on those."
Nylander made it 2-0 at 12:56 when he took a backhand, cross-ice pass from Alex Kerfoot and scored glove side from the left hash marks.
"One of the things we've been talking the most about is managing the lead and not letting teams [back] into it," Keefe said. "We took another penalty in the third period that opened the door a little bit for them, but by and large, I really liked how we handled the game once we had the lead."