The Flyers have lost nine straight to San Jose, and they are winless against the Sharks in their last 13 meetings since 2000.
Niemi had to be flawless because his counterpart, Ilya Bryzgalov, was outstanding.
Ryane Clowe scored the game's only goal, firing a left-circle wrist shot past Bryzgalov - the goalie said it deflected off one of his teammate's skates - after just 1 minute, 22 seconds.
Bryzgalov (22 saves), building off a strong shootout performance in Saturday's win in Calgary, kept the Flyers within 1-0 with big stops against Joe Thornton and T.J. Galiardi in the first 21/2 minutes of the third period.
But the Flyers couldn't beat Niemi. The Flyers had a late flurry with about 20 seconds remaining as Braydon Coburn (twice) and Claude Giroux had good scoring chances, but Niemi or his shot-blocking defensemen short-circuited them.
Giroux was held without a shot on goal for the first time in the last 77 games, including 11 playoff contests.
Jaromir Jagr said that too many shots (18) were blocked and that the Flyers need to shoot quicker.
"Don't wait until the [defensemen] come there. Shoot and maybe we get the rebounds," he said. "We're waiting too much. . . . We have to find better timing."
The Flyers, who finished a 2-2 trip and slipped into sixth place in the Eastern Conference, found themselves in a familiar spot early in the game: trailing.
Clowe scored on San Jose's first shot. On Saturday, in the Flyers' 5-4 shootout victory over Calgary, the Flames scored on their first two shots.
"Too often, we're giving up the first goal on the first shot," coach Peter Laviolette said.
Tuesday marked the eighth straight game the Flyers had allowed the first goal, and the 11th time in the last 12 games.
Incredibly, they have held a lead after the first 10 minutes in only one of their last 35 games.
After yielding the early goal, Bryzgalov settled down and made saves on the Sharks' last 10 shots in the opening period, including a point-blank drive by defenseman Dan Boyle, who was allowed to drive to the net after a defensive mix-up.
Perhaps as a wake-up call, Laviolette demoted Danny Briere to the fourth line, where he centered Sean Couturier and Zac Rinaldo.
Briere, who is goal-less in his last 17 games, was dominating in the first period, creating numerous scoring chances.
Later in the game, Briere was on the top line, centering Jagr and Scott Hartnell. With 4 minutes, 52 seconds left in regulation, Briere was checked into the boards, headfirst, by Marc-Edouard Vlasic. Somehow, Vlasic was not penalized, though he could be suspended by the league.
After the game, Briere said he was trying to set a pick for Jagr when Vlasic slammed him into the boards.
"I never expected to kind of be bulldozed there," said Briere, adding that he was surprised there was no penalty. "I got fortunate that it wasn't worse than it is. I was lost there and kind of flipped around. I was just a little dizzy for a couple of seconds and had no clue what had happened."
Surprisingly, Briere - who suffered a concussion on Jan. 21 - did not miss any shifts.
"Yeah, it should have been a penalty, but I think the refs were fair on both sides," he said. "There were probably a couple of calls we got away with, too. It didn't change the game, but it was a dangerous play, no doubt about it."
Briere, who said he expects to play Thursday against the New York Islanders, was not tested for a concussion.
"I feel good enough at this point. I think I'm OK," he said.
San Jose was without its coach, Todd McLellan, who is out with a concussion, and it played without two key players who are injured: Logan Couture (team-high 27 goals) and defenseman Douglas Murray (throat). The Sharks were coming off a 2-6-1 trip that dropped them to seventh in the Western Conference.
Contact staff writer Sam Carchidi at email@example.com, or on Twitter @BroadStBull.