Jamie Drysdale and Travis Konecny also scored, and Matvei Michkov had two assists for Philadelphia (6-3-1), which won its fifth straight home game. Dan Vladar made 32 saves.
Matthew Wood scored his first NHL goal for Nashville (4-6-2), which has lost three straight and seven of nine. Juuse Saros made 14 saves.
Zegras gave the Flyers a 1-0 lead at 12:45 of the second period, scoring on a shot from above the face-off circles.
Drysdale extended it to 2-0 at 15:41, scoring from the bottom of the left circle. It was the defenseman’s first goal of the season.
Wood cut it to 2-1 at 18:03. Erik Haula knocked down a Flyers clearing attempt at the Philadelphia blue line, and Wood, playing his 11th NHL game, scored from the slot.
Zegras made it 3-1 with a power-play goal at 7:00 of the third period. The Flyers forward has seven points (four goals, three assists) during a three-game streak.
Konecny scored an empty-net goal at 15:54 for the 4-1 final.
Flyers forward Sean Couturier missed the final two periods because of an undisclosed injury.