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.
Boston schools pull out free condoms over wrapping complaints
NBC reportedly holds celebs hostage to Jimmy Fallon's show