Tomas Hertl scored, and James Reimer made 29 saves for the Sharks, who have lost seven straight against the Oilers.
McDavid notched his 150th point when he scored with 1:44 left in the opening period for a 2-1 lead.
Jesper Bratt scored the lone goal and MacKenzie Blackwood made 38 stops for the Devils, who had won back-to-back games.
Avalanche 4, Kings 3Denis Malgin scored two goals for visiting Colorado in a win against Los Angeles.
Alex Nylander, Danton Heinen and Evgeni Malkin each scored a goal and Tristan Jarry made 19 saves for the Penguins.