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.
Jordana Brewster on Paul Walker: 'He was an enormous presence in my life'
Exploding whale video goes viral on Internet