Anthony Randolph blocked Damien Wilkins' desperation jumper at the buzzer to secure Denver's 16th straight win at the Pepsi Center - and its most unlikely.
Brewer finished with 29 points.
Wilkins had 24 points and Jrue Holliday had 18 points and 15 assists for the Sixers.
Brewer scored the Nuggets' last six points, including a 3-pointer with 9.2 seconds left that pulled Denver within 100-98.
Brewer fouled Evan Turner with 7.1 seconds left and he missed both free throws. After a timeout, Anthony Miller inbounded to Danilo Gallinari, who passed to Brewer, who was knocked down on his 3-point try by Wilkins.
The Nuggets haven't lost at home since Jan. 14 against Washington and they're in the midst of their longest winning streak since joining the NBA in 1976, a streak that survived despite an uncharacteristic 20 turnovers.
Even though Miller scored a season-high 21 points, the Nuggets sorely missed Ty Lawson (right heel) and Wilson Chandler (left shoulder), both of whom were hurt in Denver's signature win at Oklahoma City Tuesday night.
They nearly lost to the NBA's lowest scoring team, one that owns just six road wins, tied for the fewest in the league this season.
Gallinari's turnover led to Wilkins' jumper that made it 98-90 with two minutes remaining, and the crowd was standing in disbelief.
Randolph's slam dunk with made it 98-95, but Holiday sank two free throws with 14 seconds remaining to give Philadelphia a five-point cushion.
Brewer's 3-pointer made it 100-98 and the Sixers called a timeout with 9.2 seconds left when they couldn't inbound the ball.
After Turner missed his second free throw, Anthony Randolph corralled the rebound and called a timeout with 6.8 seconds left.
Before the game, it was noted that George Karl's team has been flying under the radar because of the Miami Heat's 24-game winning streak that included a comeback Wednesday night from a 27-point deficit in Cleveland.
"That's fine," Karl said. "That's fine with me. I just don't want to get down 27 tonight. I don't think we can shoot the 3 as well as Miami does and make the comeback."
Philadelphia coach Doug Collins said just because the Heat have the second-longest winning streak in NBA history doesn't diminish what the Nuggets are doing.
"We've won three in a row one time this year. They have four losses in 60 days; we have four wins in 60 days. Winning is very contagious and you get into that feeling where you go to the gym and you're supposed to win. I think Denver has it," Collins said before tipoff.
"They've had some amazing wins. Winning on the road at Oak City, winning at Chicago, they find ways to do it, they do it in different ways. I don't see them overplaying anybody to do that. That's the real key. They have a different kind of team where they don't count on one particular guy on a night to be that guy."
On Thursday night, it was Brewer's turn to turn on the heroics, and extend Denver's streak.
NOTES: Randolph swished a 3-pointer to close the first quarter but it wasn't in time and was waved off. ... Chandler said his shoulder felt better Thursday but added that he plans to sit out Denver's next three games and hopes to return March 27 against San Antonio. ... Lawson leads the Nuggets with a 16.9-point scoring average. Chandler is averaging 11.8 points and five rebounds.