Sharp scored two goals, his first in 19 games, since Jan. 28 against the Los Angeles Kings.
"It seemed like I was hitting a post every game and not having anything to show for it," Sharp said. "It was nice to shoot one there and have it deflect off one of their guys into the net. That's the game of hockey. Sometimes you get the ones that you don't deserve and vice versa. It doesn't really matter who's scoring. Two big wins with the dads this weekend; it was a fun time."
Brandon Saad, Bryan Bickell, Duncan Keith and Marian Hossa scored for the Blackhawks (41-21-6), who won for the fourth time in five games and ended the Sharks' two-game winning streak. Corey Crawford made 33 saves.
San Jose is in fifth place in the Pacific Division, four points behind the third-place Vancouver Canucks, who played later Saturday. The Sharks trailed the Kings by three points for the second wild card into the Stanley Cup Playoffs from the Western Conference.
The Sharks open a seven-game road trip Tuesday against the Winnipeg Jets.
"It hurts," Sharks forward Logan Couture said. "We've put ourselves in this position. We have to win the majority of our games, and we've got a nice long road trip through Canada, so we're looking forward to that."
The Blackhawks and Sharks entered the third period tied 2-2, but Saad and Bickell quickly gave Chicago a 4-2 lead.
Saad put Chicago ahead at 1:21 with his 21st goal of the season. As Teuvo Teravainen sent Saad a cross-ice pass on the rush, Sharks rookie defenseman Mirco Mueller lost his footing and fell down. Saad kept going and beat Niemi to his stick side from close range.
"Mirco's a 19-year-old and he's going to carry that goal with him for a while," Sharks coach Todd McLellan said. "We've all made those mistakes. Play 1,200-1,500 games, look back at everyone's career and it happens. He'll have to recover from it. We know he will. What I was impressed with was how the guys picked him up on the bench. Guys went down and tapped him and said, 'We're fine.' It would have been nice to come right back and at least tie it up after that goal, but we didn't. We move on now and find a way to win in Winnipeg."
Bickell scored from the slot at 4:56. Brad Richards sent a pass from below the goal line to Bickell, who was wide open. Bickell beat Niemi to his glove side for his 12th goal of the season and third in 24 games.
"It was a tight-checking game the first two periods and then the bounces went our way," Saad said. "It's good to see guys get off the horse and have good performances out there."
Sharp made it 5-2 at 15:10 with his second goal of the game, this one on the power play. He beat Niemi with a shot through traffic from above the right circle.
Hossa scored an empty-net goal with 2:15 left in the third.
"It's nice to break through offensively," Sharp said. "A lot of guys had it going tonight. We had a good four-line rotation and good 5-on-5 units. It was a good time."
Forward Patrick Kane, who leads the Blackhawks in goals (27), assists (37) and points, missed his seventh game with a fractured clavicle; Chicago has gone 5-1-1. Coach Joel Quenneville said the Blackhawks have played the right way during Kane's absence.
"I think defensively, we're starting with that," Quenneville said. "[Crawford's] been solid as you could ever want. Across the board, we're not looking to outscore anybody. We're thinking checking. We won some tight ones. We're pleased with what transpired for sure on this road trip."
The Blackhawks opened the two-game trip with a 2-1 overtime victory against the Arizona Coyotes on Thursday and ended it with a win against San Jose.
Crawford is 5-0-1 in his past six starts and defeated the Sharks for the second time this season; San Jose had 10 of the first 11 shots.
"He held the fort there the first period," Sharp said. "These guys come very hard in their building, and it's a difficult place to play in general. They got a ton of chances. [Crawford] was there when we needed him and was solid all night."
Chicago took the lead at 6:03 of the first period when Sharp scored on his rebound. He took a pass from Antoine Vermette, skated past Sharks defenseman Justin Braun on a breakaway, and tried to beat Niemi with a backhand from close range. Niemi made a right-pad save, but Sharp got the rebound left of the crease and elevated a sharp-angled shot over Niemi, who was face-down on the ice.
The Sharks scored the first goal in seven straight games before Saturday.
After Sharp's goal, the Blackhawks turned up the pressure, taking four of the next five shots and dominating play. But the Sharks tied it 1-1 at 16:49 on Karlsson's 12th goal of the season.
Sharks defenseman Matt Irwin, who returned to the lineup after missing three games with an upper-body injury, shot from the left circle, and the puck caromed off Crawford to Karlsson in the slot. He beat Crawford with a wrist shot, scoring his third goal in the past five games.
After outshooting the Blackhawks 14-9 in the first period, the Sharks outshot them 12-4 in the second, but each team scored on the power play.
With Sharks defenseman Brenden Dillon in the penalty box for interference, Keith scored at 8:45, giving Chicago a 2-1 lead. Keith took a cross-ice pass above the right circle from Hossa and beat Niemi to the far side. The goal was Keith's eighth of the season and ended an 18-game drought.
Thornton answered at 12:16, with some assistance from Blackhawks defenseman Brent Seabrook. Thornton sent a shot from the right point through traffic, and the puck caromed off Seabrook's stick past Crawford.
"We played a solid two-period game and the third goal was a heartbreaker," Thornton said. "You think you can get back into it, and the fourth one just puts it out of reach. We played good for 40-odd minutes, and that's not good enough. We were sharp right from the drop of the puck. Crawford made some great saves. We could have easily had the lead after two."
Former Blackhawks forward Ben Smith and former Sharks forward Andrew Desjardins, who were traded for each other March 2, faced those teams for the first time. Smith centered San Jose's fourth line, and Desjardins skated at left wing on Chicago's fourth line.
Desjardins had two hits and a takeaway and blocked a shot in 9:08. Smith one hit and one shot and won seven of 10 faceoffs in 11:28.
The Sharks recalled forward Daniil Tarasov from Worcester of the American Hockey League. Tarasov was on the ice for warm-ups but was a healthy scratch.