The Wizards, who had lost 11 of 13, won despite blowing a 21-point second-half lead. Marcin Gortat scored 16 points and grabbed 17 rebounds for Washington.
With the Wizards up by one, Bradley Beal made his first free throw with 10 seconds left, making it 97-95. He missed the second, but the rebound was batted out to Wall, who was fouled and made both shots with 7.3 seconds left.
Greg Monroe had 21 points and 10 rebounds, and Spencer Dinwiddie added 20 off the bench for Detroit, which has lost three straight.
The Wizards led by 16 at intermission, and Paul Pierce's three-pointer capped a 7-0 run that put them up, 69-48, with 8:58 left in the third quarter.
Detroit chipped away, however, and trailed, 80-70, to start the fourth. A 9-0 run got the Pistons within one, and when Dinwiddie rebounded his own miss and dunked, the Pistons led 85-84 with 6:46 left.
The Wizards regained the lead for good, 90-89, on two free throws by Gortat.
Brooklyn 104, at Dallas 94: Deron Williams scored 25 points, Thaddeus Young had 16 points and eight rebounds off the bench and the Nets topped the Dallas Mavericks. The victory completed a 3-5 trip for the Nets, who moved into eighth place in the Eastern Conference.
Memphis 101, at Minnesota 97: Marc Gasol had 27 points and 11 rebounds, and Mike Conley hit a big three-pointer with 30 seconds left to lift the Grizzlies to a much-needed victory over the Timberwolves.
at New York 103, Toronto 98: Tim Hardaway Jr. scored 22 points, Langston Galloway made a clinching three-pointer and the Knicks ended a sad day for the franchise with a victory over Toronto, the Raptors' season-high fifth straight loss.
Atlanta 93, at Miami 91: Paul Millsap scored 22 points, Dennis Schroder added 16 points and 10 assists and the intentionally depleted Hawks still had enough to beat the Heat.
at Utah 82, Milwaukee 75: Trey Burke had 23 points and six assists to help the Jazz hold off the Bucks. Derrick Favors added 16 points, 12 rebounds and three steals for the Jazz, which has won consecutive games for the sixth time this season.