Guerin finished his eighth career hat trick on a penalty shot with 12.3 seconds to play, capping a four-point night. The veteran forward was scoreless in his first six games since arriving in a trade with St. Louis, but took charge in a rare easy home victory for San Jose.
Joe Thornton had a goal and two assists, and Milan Michalek had a goal and an assist for the Sharks, who scored four times in the third period. Mark Bell and Mike Grier added goals as San Jose earned its second straight win at the Shark Tank after losing seven of its previous eight here.
San Jose provided more than enough offence for Nabokov, who seems to be getting sharper with each of his 13 consecutive starts after spending most of the season in a platoon with Vesa Toskala.
After racking up a franchise-record scoreless streak of more than 166 minutes earlier in the month, Nabokov made 18 saves and was agonizingly close to his eighth shutout of the season before Martin Lapointe scored an unassisted goal with 3:30 left.
Patrick Lalime stopped 27 shots for the Blackhawks, whose three-game winning streak ended in the second stop of a five-game road trip that includes games against the NHL's three California teams in four days.
San Jose hadn't won back-to-back home games since mid-January.
The Sharks acquired Guerin at the trade deadline for two players and a high draft pick. The veteran forward hadn't cracked the scoresheet in his first six games with San Jose despite playing on a line with captain Patrick Marleau.
But Guerin scored the Sharks' opening goal against Chicago through sheer hustle. Just eight minutes in, he outskated a defenceman to a loose puck for a stretching two-handed shot - and it somehow got underneath Lalime.
Guerin ripped a shot off the post moments later, and Bell capitalized for his ninth goal of a disappointing debut season with San Jose after spending his entire career with Chicago.
San Jose clearly responded to coach Ron Wilson's demands for more passion at home, taking a 15-1 shot advantage with a blistering attack in the first 11 minutes.
Michalek got his 19th goal of the season late in the second period, converting a brilliant backhand pass from Thornton behind the net.
Thornton added a goal in front early in the third period - and after Grier scored on a pass from Michalek, Guerin stuffed another puck under Lalime to complete the fourth 30-goal season of his career.
He added his 31st with a confident move on his penalty shot, setting off a shower of hats from the sellout crowd.
Notes: Sharks C Joe Pavelski sat out with a foot injury. ... The clubs meet again in Chicago in eight days. Players from both teams scuffled after the final buzzer, with Blackhawks D Duncan Keith attempting to fight Sharks C Marcel Goc. ... The Blackhawks haven't won four straight games all season. ... LW Rene Bourque sat out for Chicago. He has missed 37 games this season with various ailments.