The short-handed Pistons needed a miracle just to get to the extra period - they trailed 98-95 with 1.5 seconds to play, and Denver only needed to put the ball into play at midcourt.
The inbounds pass, though, bounced off Allen Iverson and Tayshaun Prince, and Wallace threw up a desperation two-handed set shot that banked in as the buzzer sounded.
Denver led 106-103 in overtime, but Wallace hit another 3-pointer to tie the game with a minute left.
Chauncey Billups led the Pistons with a season-high 34 points and 10 assists.
Marcus Camby paced the Nuggets with 24 points and added 13 rebounds.
NEW YORK - Jameer Nelson made the tying and go-ahead 3-pointers and finished with 18 points as Orlando sent New York to its season-high fourth straight loss.
The playoff-hopeful Magic moved into sole possession of seventh place in the Eastern Conference, snapping a tie with New Jersey.
Stephon Marbury scored 32 points for the fading Knicks, who have lost six of seven. They fell two games behind New Jersey for the eighth spot.
BOSTON - Paul Pierce scored 23 points and Al Jefferson added 22 points and nine rebounds to help Boston snap a three-game losing streak.
Delonte West scored 18 points and Rajon Rondo had 16 points and eight assists for the Celtics, who trailed only in the opening minutes and became the last team in the NBA with 10 home wins. Boston is a league-worst 10-25 at home.
Toronto All-Star Chris Bosh struggled, scoring 15 on 5-of-19 shooting. He also had 11 rebounds.
HOUSTON - Tracy McGrady scored 22 points and had nine assists, and Houston won its sixth straight home game.
Juwan Howard added 12 points and 10 rebounds for the Rockets, who are 9-3 since Yao Ming returned from a broken leg. Houston got away with a so-so night from its All-Star big man in this one - Yao scored 22, but missed 13 of 22 shots.
Michael Redd scored 26 and Charlie Bell added 20 for the Bucks, who haven't won in Houston since 1999, a seven-game losing streak.
CHICAGO - Luol Deng scored a career-high 38 points, and Chicago won its third straight.
After beating Denver and Indiana on last-second shots, the Bulls found themselves in another close game until an 8-0 run midway through the fourth quarter put away Portland.
Deng, whose previous career high was 32 points, hit 18 of 25 shots and played a big role during the deciding run.
MIAMI - Shaquille O'Neal scored 22 points to pass Reggie Miller for 12th on the NBA's career list and Miami finished off a four-game season sweep of Atlanta.
O'Neal entered the night 10 points behind Miller's total of 25,279, and passed the former Indiana sharpshooter with a free throw midway through the first half.
SALT LAKE CITY - Carlos Boozer scored 16 of his career-high 41 points in the fourth quarter and added 16 rebounds to help Utah rally for a victory.
Boozer, who scored 39 points in an overtime loss to Memphis on Jan. 24 for his previous career high, made two free throws to clinch Utah's sixth straight home win.
Gilbert Arenas scored 26 of his 32 points in the second half for Washington.