The Devils (28-22-4) are five points behind the Flyers for third place in the Metropolitan Division with a game in hand. They're two points behind the Detroit Red Wings for the second wild card into the Stanley Cup Playoffs from the Eastern Conference.
Owen Tippett scored two goals, both off passes from Travis Konecny, and Samuel Ersson made 34 saves for the Flyers (29-20-7).
"We move by it," Flyers coach John Tortorella said. "I hope the families had fun. I hope the boys had fun. You lose the game, you move by it. You've got to be really careful to not make it into more of a thing than losing a game."
It was an all-Jersey atmosphere in the Garden State's biggest venue.
The parking lots were filled with tailgaters hours before the Jonas Brothers, who grew up in nearby Wyckoff, New Jersey, took the stage shortly before 7 p.m. ET for their pregame concert.
Max Weinberg, the drummer for Bruce Springsteen's E Street Band introduced the Devils. Saxophonist Jake Clemons, who plays with Springsteen and the E Street Band, played a stirring rendition of "The Star-Spangled Banner."
The temperature at opening face-off was 30.6 degrees Fahrenheit. The game was played in front of the largest crowd in Devils history and fifth-largest in NHL history.
"It's exciting to play in these games, this atmosphere, having those fans," Smith said. "I mean, the place was packed. It kind of threw me off a little bit and it was quite exciting. To get our captain to get us off right off the bat was huge."
Hischier scored on a breakaway 32 seconds into the game to give the Devils a 1-0 lead.
It was the second-fastest goal to start an NHL outdoor game behind Colby Armstrong's goal 21 seconds into the 2008 Winter Classic in Buffalo.
Toffoli made it 2-0 at 13:30 with a goal off a rebound of Smith's shot from the point.
"That second one where 'Toff' puts it in, that puts us in the seat," Smith said.
Tippett got the Flyers to within 2-1 at 7:43 of the second period, scoring from between the circles.
The Flyers were outshooting the Devils 20-4 in the second when Konecny went to the box for a retaliatory slashing penalty on Smith at 10:51 that wiped away their own power play.
Nick Seeler then went to the box at 13:46 for high-sticking Jesper Bratt.
"When you come out with a start like that, and you have the opportunities you do and it doesn't always go your way, I think frustration can set in," Tippett said. "It is what it is. It's the way the game goes sometimes and it's just how you respond."
Philadelphia killed both penalties, but Smith scored off a rebound of Palat's shot at 16:36 to make it 3-1 Devils and Bastian scored 72 seconds later with a shot from right circle into the top right corner of the net to give New Jersey a 4-1 lead at 17:48.
"I thought the most important part of the game was when we got it rolling in the second period, then we started taking penalties," Tortorella said. "Not so much being man down, but we're man down, 4-on-4. We needed another goal in the second period. I thought we were right there knocking on the door, but then we took some penalties, and it took us out of our flow."