Kailer Yamamoto and Evan Bouchard also scored for the Oilers (16-5-0), who won their third game in a row. They improved to 9-1-0 on home ice despite getting outshot 26-13 through the first two periods and 34-22 overall.
''We kind of held on for the first 40 minutes,'' McDavid said. ''Mikko (Koskinen) did a great job as usual and I thought our young defensemen did a good job stepping in and trying to keep the game simple, keep the game in front of them.
''We kind of worked our way through the game and capitalized on our chances and got some timely saves.''
Jake Guentzel and Teddy Blueger each had a goal for the Penguins (10-8-5), who have lost three straight. Pittsburgh was 15-0-4 in its previous 19 games against the Oilers.
''We just make a few mistakes and it ends up in the back of the net,'' said Sidney Crosby, who was held to one assist. ''We had some good pressure, some good zone time for most of the night, and you give them any opening and they take advantage of it.''
Edmonton started the scoring seven minutes into the opening period as Hyman picked the top corner behind Penguins goalie Tristan Jarry.
Pittsburgh tied it with five minutes left in the first when Guentzel unleashed a one-timer that Koskinen couldn't get across the crease to stop. The goal extended Guentzel's point streak to 11 games.
McDavid elected to pass on a 2-on-1, setting up Hyman's second of the game and 11th of the season a minute later as Edmonton regained the lead.
A minute into the second period, Blueger beat Koskinen high to the blocker side after taking a nice feed from Evan Rodrigues to tie it again.
Edmonton made it 3-2 three minutes into the third as Yamamoto deftly deflected a long shot from Tyson Barrie into the net.
McDavid earned his third assist of the night playing 4-on-4 eight minutes into the third as he threaded a pass through to Bouchard for an easy tap-in on another 2-on-1 opportunity.
The hats came raining down with nine minutes left as it appeared Hyman had scored his first hat trick, but a video review determined the play was offside.
''Eventually it will happen,'' Hyman chuckled. ''It was fun almost getting a hat trick there.''
Edmonton put the game away on an empty-netter by McDavid, unable to get the puck to Hyman on the play.
''We can be better,'' Oilers coach Dave Tippett said. ''We can be cleaner with the puck and harder on loose pucks. We were in the third, but I'd like to see it for 60 minutes.''
NOTES: Edmonton is 9-0 when scoring the first goal. ... The Oilers entered with the top power play in the NHL at 37.7%, while the Penguins were the top penalty killers at 90.9%. ... Absent from the Penguins' lineup were Evgeni Malkin (knee) and Bryan Rust (lower body). Edmonton was without Mike Smith (lower body) and Devin Shore (lower body), as well as four regular defensemen in Darnell Nurse (broken finger), Slater Koekkoek (lower body), Duncan Keith (lower body) and Cody Ceci (COVID-19 protocol). As a result, blueliner Markus Niemelainen was called up to make his NHL debut.
Penguins: Visit the Vancouver Canucks on Saturday.
Oilers: Play at Seattle on Friday.
More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports
Copyright 2022 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.