San Jose snapped a two-game skid and stayed in the thick of the tight Western Conference playoff race, in which six teams battling for three post-season spots are separated by four points.
Niemi's shutout bid ended when Zdeno Chara tallied on a wrist shot with 4:15 to play.
Tim Thomas stopped 25 shots for Boston, which had won two in a row.
Megyn Kelly: Santa Claus and Jesus are both white men
Costly malfunction causes beer flood at Boston-area brewery