Jared Spurgeon, Ryan Hartman and Nick Bonino also scored and the Wild finished 4-1-2 on a season-high, seven-game homestand. Kirill Kaprizov added two assists and Cam Talbot stopped 19 shots.
Minnesota, which began the day a point behind Colorado for second place in the West Division and home-ice advantage for the opening playoff round, is 21-5-2 at Xcel Energy Center this season, including 19-2-2 since Jan. 31.
''Whenever you're playing at home, you want to make sure you take care of business, and we've done that so far this year and we have to continue that going into playoffs,'' Spurgeon said.
Near the end of his shift, Rask took a pass from Matt Dumba and hammered a shot past Ryan Miller from the left circle.
''It was just a great pass by Dums, he caught everyone off guard. I wasn't very tired, so I still had legs,'' Rask said.
Miller concluded his stellar 18-season career by making 21 saves for Anaheim, which finished 17-30-9 and missed the playoffs for the third straight season.
Rickard Rakell, Trevor Zegras and Max Comtois scored, the latter on a slap shot with 25.5 seconds left in regulation.
''The last few games we're playing against very, very good teams and you can see we're right there and we just got to take that next step,'' coach Dallas Eakins said.
Kaprizov, the favorite to be named the league's top rookie, has 24 assists among his team-leading 51 points. He has 11 goals and five assists in his last 12 games.
His second helper of the night was a saucer pass to Hartman for an easy redirect for a 2-1 lead.
''I would be more than fine with him shooting that puck too. Good chance he's going to put it in the net. . The goalie has to respect his shot and his ability to score and I was just there,'' Hartman said.
Bonino took a feed from Nico Strum to score less than a minute later.
Zegras scored early in the third period to get the Ducks within 3-2 and was robbed by a sprawling save by Talbot a few minutes later.
Anaheim did not score during its lone power play. Its 8.9% success rate this season is the worst in modern-era league history. Tampa Bay had a 9.4% power-play percentage in 1997-98.
ONE LAST MILLER TIME
Miller received congratulations from all Ducks and Wild players after the game, his 796th and final one. He also received a standing ovation following a tribute video played during the first period. Miller countered with a wave and stick salute.
His parents were among those watching in person.
''It was nice to have them there. They were there at the beginning and I felt it was the right thing to have them there at the end,'' Miller said.
Finishing with a career record of 391-290-1 playing for Buffalo, St. Louis, Vancouver and Anaheim, Miller is the all-time leader among American-born goaltenders in wins, second in shutouts (44) and games played (795) and is one of six goalies in league history to win 30 games in seven straight seasons (2006-12).
Miller won the Vezina Trophy in 2009-10 with Buffalo, going 41-18-8 with .929 save percentage and a 2.22 goals-against average. He also backstopped the United States to a silver medal at the 2010 Vancouver Olympics that season and was named the tournament's MVP.
Said Wild coach Dean Evason: ''Hopefully our young guys really appreciate where these guys have come from and how they've competed for that long and try to do the same.''
NO PARISE AGAIN
Wild LW Zach Parise was a healthy scratch for the second straight game and third time since April 5. ''It's numbers, and we have to make a decision. It's a tough call, obviously, but you've got to make that decision,'' Evason said.
In the ninth season of a 13-year, $98 million deal, Parise has seven goals and 11 assists in 44 games, but zero of either in nine straight games as his playing time has steadily decreased.
Wild: First of two games at St. Louis starting Wednesday.
More AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports(backslash)
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.