Alexander Kerfoot had a goal and an assist for Toronto, which has won three of its past four games.
''We wanted to finish the road trip off the right way,'' Andersen he said. ''I thought we answered really well. The way we played in the third was really good and it was awesome to see, I didn't think we gave them too much, except on the power play maybe. Overall it was a good game.''
Ilya Mikheyev, Frederik Gauthier and Mitch Marner also scored for the Maple Leafs.
Toronto coach Sheldon Keefe credited the role players on his team for their efforts on the night.
''They were great, they skated, they worked, they made plays, they attacked the net,'' Keefe said. ''There was a lot of really good things they were doing. They were feeling it today and it's a good sign for our team.''
Alex Chiasson scored for the Oilers, who have lost four in a row.
''I liked our effort. Our compete was there. Our energy was there. We just couldn't find a way to get any back,'' Oilers captain Connor McDavid said. ''Losing four in a row is not good enough. We've got to find a way to put some wins together here and it starts on the road.''
Toronto started the scoring 4:38 into the opening period as Pierre Engvall made a nice feed through traffic from behind the net to Kerfoot, who blasted a shot up high past Oilers goalie Mikko Koskinen, who was playing without his stick.
Maple Leafs defenseman Tyson Barrie left the game later in the period after blocking a shot and did not return.
Toronto took a 2-0 lead 5:27 into the second period. After getting a pair of big rebounds in front of the Edmonton goal, Mikheyev slammed home his fifth of the season into an empty net.
The Oilers got on the board 6:08 into the third period on the power play as Chiasson was sent in alone and was able to just sneak a backhand past Andersen.
The Maple Leafs restored their lead with six minutes to play as Dmytro Timashov sprung Gauthier and he was able to wire a shot into the top corner.
Toronto put the game away with an empty-net power-play goal from Marner, his sixth of the season.
NOTES: Gauthier returned to the lineup after being scratched the previous four games. ... Leafs forward Trevor Moore was expected to make a return but remained out, missing his 13th game with a shoulder injury. Also out for Toronto was Andreas Johnsson (leg). Out for Edmonton was defenseman Matt Benning (concussion).
Maple Leafs: Host Buffalo on Tuesday night.
Oilers: At Dallas at Monday night.
More AP NHL:
https://apnews.com/NHL and https://twitter.com/AP-Sports
Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.