Extra time was needed after Boston's Zdeno Chara created a 2-2 tie with his 13th goal this season at 18:44 of the third period. The overtime was scoreless and Nashville won the shootout 2-1, with Jordin Tootoo scoring its other shootout goal.
In regulation, Legwand scored his 13th and 14th goals in the first and second periods.
Pekka Rinne turned away 23-of-25 shots for the Predators, who have won two in a row and six of eight. They have won three of their last five home meetings against the Bruins.
Blake Wheeler scored Boston's other regulation goal at 13:25 of the second period, and the other shootout goal.
Manny Fernandez was beaten twice on 31 shots for the Bruins, who have lost four games in a row for the first time this season.
Puzzle-maker slips 'Murdoch Is Evil' into Rupert Murdoch's Sunday Telegraph
Exploding whale video goes viral on Internet