Evan Bouchard, Ty Emberson, Corey Perry and Connor Brown scored for the Oilers (46-28-5), who have won two straight since McDavid returned to the lineup.
Edmonton also remains without league-leading goal scorer Leon Draisaitl (undisclosed), forward Ryan Nugent-Hopkins (illness) and defenceman Jake Walman (undisclosed).
Will Smith and Henry Thrun replied for the Sharks (20-48-11), who have lost eight games in a row.
Calvin Pickard made 22 stops for the Oilers, while Georgi Romanov recorded 30 saves for the Sharks.
Sharks: Taken fourth overall in the 2023 NHL Entry Draft, rookie forward Smith extended his goal-scoring streak to a career-high four games. Smith has been stellar for San Jose with eight points (five goals, three assists) in that span.
Oilers: McDavid has looked very sharp in his return from missing eight games with an injury, racking up seven points in two outings. With three games remaining, McDavid is three points shy of hitting 100 on the season for the fifth year in a row. He became just the third player in NHL history to record seven 70-assist seasons, joining Wayne Gretzky (16) and Mario Lemieux (eight).
The Oilers took a 2-0 lead with less than five minutes remaining in the opening period as McDavid spotted Emberson sneaking in from the point. The young defender directed it off of Romanov’s glove and in for his first of the season, snapping an 89-game goalless drought.
Edmonton qualified for the playoffs for the sixth straight season, its second-longest stretch of consecutive post-season appearances since qualifying 13 years in a row upon entering the NHL in 1979-80.
Sharks: Take on the Flames in Calgary on Sunday.
Oilers: Visit the Winnipeg Jets on Sunday.