Tristan Jarry made 25 saves for the Penguins (15-15-5), who lost in regulation for the first time in five games (3-1-1).
"They were using the middle of the ice really well and attacking us," Jarry said. "They were able to get to the net front and battle hard. We could have done a better job in the third period."
Markstrom had four saves in the second period, including a glove stop while diving to his left to force Sidney Crosby off the right post at 3:42.
"We stayed calm even though I don't think we played our best game," Hischier said. "[Markstrom] made some huge saves for us to keep us in the game, and we just stuck with it and eventually got the win."
Stefan Noesen gave the Devils a 1-0 lead at 17:32 of the second. Hischier spun away from Penguins defenseman Owen Pickering along the right wing half boards and backhanded a pass to Noesen in the slot for his NHL career-high 15th goal of the season.
"I think it was opening up for a one-timer, but it was a nice high sauce by [Meier]," Hischier said. "I think [the spin move] is just something that naturally happens when you're on the ice, holding onto pucks and cutting back."
Markstrom, who earned the 22nd shutout of his NHL career, denied Philip Tomasino skating down the slot with a left pad save at 6:40 of the third period.
"We're going to make mistakes and when we do, it's nice to have a guy back there like him," Dillon said of Markstrom. "It's nice to get the win, bear down and get the shutout."
Hischier pushed it to 2-0 on a snap shot at the right post at 7:47 of the third while Noesen was jostling with defenseman Ryan Shea for position in the slot.
"I actually thought I was about to fight so I was a little surprised it went in," Noesen said. "[Keefe's] really trusting me and they signed me to play kind of down the lineup and that's kind of what I think I do best. Whatever you need me to do ... you tell me to run through a wall, you tell me to do this, I'll try to do that."