San Jose rebounded from a 7-2 home loss to Chicago on Wednesday night.
"We didn't play too well until we were down by two goals and then we found some urgency to our game," Sharks star Joe Thornton said. "It was important to bounce back after that last game. We still feel we need to play better."
Marleau completed the hat trick with a short-handed goal with 1:26 left in regulation. He also assisted on Ryane Clowe's goal.
"There were a lot of turnovers each way and we were able to capitalize on some bounces," said Marleau, who has 17 goals this season.
The Sharks have won three of their last four to improve to 17-6-4.
Ryan Potulny scored twice in regulation for Edmonton, and Dustin Penner and Gilbert Brule added goals. Penner had a chance to tie it in the third round of the shootout, but Evgeni Nabokov stopped his backhand attempt to end the game.
"There is no way we should have lost this hockey game," Oilers coach Pat Quinn said. "We did some really good things, but what has been our problem here from day one is we don't cover well against our net. We have a group that stares at the puck and doesn't recognize danger."
San Jose forward Dany Heatley played his first game in Edmonton since spurning a trade to the Oilers last summer that would have seen him dealt from Ottawa for Penner, Andrew Cogliano and Ladislav Smid. Booed throughout the contest, Heatley had an assist on Marleau's first-period goal.
"They booed a little bit, but it wasn't too bad," Heatley said. "I'm kind of glad to get this all over with. There was a lot of hype. I'm glad to get the two points and get out of here."
Before the game, the Oilers learned that right wing Ales Hemsky will miss the rest of the season because of a left shoulder injury that will require surgery to repair.
"It's frustrating because it's a big year for a lot of players," Hemsky said. "Especially considering it's an Olympic year, but there's nothing I can do. It's no fun playing with an injury like that. I tried, but it just didn't work out."
Already fighting shoulder problems, Hemsky was hurt again Wednesday night in a loss to Los Angeles when he was hit from behind by Michal Handzus.
Edmonton dropped to 10-12-4. The Oilers have four wins in their last 17 games.
The Oilers will open a six-game trip in Vancouver on Saturday night. ... Sharks center Torrey Mitchell was activated for the game after a conditioning stint in the AHL. The Sharks shipped Joe Callahan to Worcester to create roster room.