It was the first loss in five games for the Oilers (30-31-7), who are seven points behind the Minnesota Wild for the second wild card into the Stanley Cup Playoffs from the Western Conference.
"They are a good team and they made us pay when they had their opportunities," Oilers defenseman Oscar Klefbom said. "Obviously, we came up short. You can't give a team like that as many opportunities as we gave them."
Rielly gave Toronto a 1-0 lead at 19:46 of the first period when he one-timed a loose puck from the left point.
Tavares scored at 12:28 of the second period to make it 2-0. He took a pass from Zach Hyman with speed at the Edmonton blue line, skated around defenseman Kris Russell, and lifted a shot over Stolarz. It was Tavares' 38th goal, matching his NHL career high, set in 2014-15 with the New York Islanders.
Muzzin converted a pass from William Nylander on a 2-on-1 rush to make it 3-0 at 3:00 of the third period.
"I thought we played well, I thought we had lots of guys going, and we controlled the puck," Maple Leafs coach Mike Babcock said. "I would like to have the last two minutes back, we couldn't figure out where to stand at the end, but it'll give us good tape to go back and look at it and fix that. You can't give up that, but I thought [Andersen] was real strong, and it's a good win, and obviously, five of six points on the road is pretty good."
Nugent-Hopkins scored at 18:21 to make it 3-1 with Stolarz pulled for the extra skater. Klefbom scored off a pass from McDavid to make it 3-2 with 53 seconds left.
"It was a rich game. It's a great game to evaluate on," Oilers coach Ken Hitchcock said. "It tells you what you've got now and what you've got moving forward, and when you've got a team that can play at that tempo, especially through the middle of the ice, any mistakes get exposed."
Zack Kassian had a chance to tie the game with 30 seconds remaining, but Andersen made the save on his shot from the right hash marks on the rush.
"[Andersen] was outstanding, I thought he made a lot of really impressive saves," Rielly said. "But more than that, he plays the puck, he's a leader for us, and we've become used to it a little bit, just of how consistent he's really been, and tonight was another example of that."