Philipp Kurashev scored in the first round of the shootout for the only goal, giving the undermanned Blackhawks their longest winning streak since also winning five straight in January 2020.
''We got it done somehow,'' coach Luke Richardson said. ''Sometimes it's just not conventional, not necessarily ugly, but it was a little bit sloppy at some times. But it's a road game. Guys scraped it out. Guys were banged up and we got the win.''
David Gust scored his first career goal, Brett Seney added his first goal in more than four years, and Max Domi also scored for Chicago.
Nick Bonino, Evgeny Svechnikov and Erik Karlsson scored for the Sharks, who have lost five of six games. Kaapo Kahkonen made 32 saves.
The teams traded goals in the third, with Domi scoring on the opening shift of the period for Chicago and Karlsson answering with 2:11 to play after San Jose pulled Kahkonen.
But Chicago pulled it out in the shootout.
''Good to fight back at the end and get a goal late. But when you don't win it sucks,'' Sharks captain Logan Couture said. ''We would have liked to get that win.''
The Blackhawks got goals from unlikely sources in the first period.
The 29-year-old Gust, who grew up in the Chicago area, was called up to the NHL earlier this week and got into the lineup for the first time against the Sharks.
He didn't take long to make an impact, scoring on his first career shift when he got in front of the net to deflect a pass from Colin Blackwell past Kahkonen. Gust joined Eddie Olczyk as the only Illinois natives to score in their NHL debuts with the Blackhawks.
''First shift. Can't write it up any better,'' Gust said. ''Good first game. It's good to get that out of the way.''
After Bonino tied it for San Jose, Seney scored on the rush for his first goal since Feb. 9, 2019, when he played for New Jersey. Seney was called up from the minors last week.
Svechnikov answered for San Jose.
The Sharks held a pregame ceremony to retire the No. 12 jersey for Patrick Marleau.
San Jose's first homegrown star broke Gordie Howe's record for games played with 1,779 in his career. He holds the Sharks records for games played (1,607), goals (522) and points (1,111).
Marleau played 21 of his 23 seasons in the NHL for San Jose after being drafted second overall in 1997. He finished his career in 2021.
''It was surreal,'' Marleau said after the ceremony. ''It just flashes before your eyes that everything I did led up to that moment.
Kane flew back to Chicago before the game as talks heat up about a possible trade to the New York Rangers. Kane has a no-movement clause and must approve any deal.
Chicago also held Lafferty out of the lineup for ''roster management'' reasons in advance of Friday's trade deadline.
Sharks forward Timo Meier, also the subject of trade talks, missed his third consecutive game with an upper-body injury that is not considered serious.
Chicago placed forward Reese Johnson (concussion protocol) on injured reserve retroactive to Feb. 20.
Blackhawks: Visit Anaheim on Monday night.
Sharks: Host Montreal on Tuesday night.
AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.