Egor Chinakhov had a goal and two assists, Evgeni Malkin had a goal and an assist, and Bryan Rust, Tommy Novak and Erik Karlsson scored for the Penguins (41-22-16), who had missed the postseason three straight seasons after a run of 16 straight appearances, including winning the Stanley Cup in 2009, 2016 and 2017.
Sidney Crosby had two assists and Stuart Skinner, who sustained an eye injury while sitting on the bench during a game on Saturday, made 19 saves for Pittsburgh.
Paul Cotter and Jack Hughes scored and Jake Allen made 26 saves for the Devils (40-36-3), who were eliminated from playoff contention on Tuesday.
The score was 1-1 midway through the second period when Novak and Chinakhov scored nine seconds apart to put the Penguins ahead.
Novak made it a 2-1 game at 11:43, taking a pass from Malkin near the goal and beating Allen on the short side.
Crosby won the ensuing face-off back to defenseman Ryan Shea, who flipped the puck in the air and found Chinakhov, who was able to gather it and bat a backhanded shot past Allen.
Rust gave the Penguins a 1-0 lead at 4:53 of the first period when he completed a slick tic-tac-toe play with Kris Letang and Chinakhov. Letang had the puck at the blue line, made a pass to a cutting Chinakhov, who one-timed it to Rust, who put it in before Allen could get back in position.Â
The Devils made it 1-1 at 9:51 of the second period when Dougie Hamilton flipped a high pass over the Penguins defense to Cotter, who skated in on Skinner and beat him with a slick forehand, backhand move.
Hughes got the Devils to within 3-2 at 15:07 of the second when he took a pass near the blue line from Jonas Siegenthaler, skated into the slot and beat Skinner with a wrist shot.
Malkin gave Pittsburgh a 4-2 lead at 6:50 of the third, picking up a loose puck in the crease and banging it home after Crosby tossed the puck on goal from below the goal line. Karlsson scored an empty-net goal at 17:00 to make it 5-2.