Niemi turned aside 12 shots in each of the first two periods and improved to 34-17-6 for San Jose, which vaulted over Detroit into the Western Conference's second seed with three games left to play.
Michal Handzus scored the only goal for the Kings, who remained in a tie with Phoenix for the West's fourth seed.
Jonathan Quick started in net and stopped 12-of-16 shots before being pulled during the Sharks' four-goal second period.
Jonathan Bernier allowed two goals on 19 shots the rest of the way.
Celebrity Breakups and divorces of 2014 [PHOTOS]