Radim Vrbata finished with a goal and an assist while Martin Hanzal and Raffi Torres scored for the Coyotes, who got 32 saves from Mike Smith as they bounced back from a 4-1 loss to the Pacific Division rival Anaheim Ducks on Tuesday.
"I thought we competed hard and did some things better than the other night," Coyotes head coach Dave Tippett said. "We got a couple of good bounces that went our way and we were able to use that as a confidence builder and find a way to get a win."
Patrick Marleau finished with a goal and an assist, while Jamie McGinn and Logan Couture scored for the Sharks, who had their three-game winning streak snapped. Antti Niemi made 19 saves and Ryan Clowe added three assists in defeat.
Phoenix netted the game-winner at 8:03 of the third period when Korpikoski picked up the puck on the right wing, gained the blue line and ripped a shot off the arm of Niemi. The puck caromed to the corner, where Boyd Gordon threw it to the front and Korpikoski was there to stuff it home and give the Coyotes a 4-2 lead.
Trailing by two, San Jose pulled Niemi in favor of the extra attacker. The move paid off as Joe Thornton moved in on the left wing and sent it to Clowe, who then sent it cross-ice to a wide open Marleau, and he tapped it home from in front to make it 4-3 with 32 seconds to play in regulation.
Vrbata added an empty-netter to ice the game with under a second left to account for the final score.
After a scoreless first period, the teams exploded for five goals between them and the Coyotes took a 3-2 lead into the third frame.
San Jose struck first just 3:44 into the period when Couture pounced on a rebound off the stick of Clowe to stuffed it past Smith, but the Coyotes came up with an answer just 32 seconds later when Torres beat Niemi with a wrister from the slot.
Korpikoski scored his first goal of the game at 9:29 of the first stanza when he one-timed a pass from Doan past Niemi from the slot to put the Coyotes up 2-1, but San Jose answered just under three minutes later with a power-play tally from McGinn when he deflected one past Smith from in front to tie it at two.
Hanzal put the Coyotes ahead again, 3-2, with 47 seconds to go in the second period when he took a pass from Ray Whitney off a 2-on-1 and quickly put behind an out-of-position Niemi.
"We weren't very good," Sharks head coach Todd McLellan said. "We weren't very good on pursuit, we weren't very good on coverage and we didn't create very much, so give them credit, they were well prepared and they established ice better than we did."
Phoenix failed to convert on three power-play chances, while the Sharks went 1-for-2 with the man advantage...Phoenix will host the Detroit Red Wings on Monday, while San Jose will host the Calgary Flames next Wednesday.