Tony Parker scored eight of his 14 points in the fourth quarter for the Spurs, who won their eighth straight and improved to 4-0 on their annual Rodeo Road Trip.
The Pistons trailed by 16 in the third quarter, but battled back to grab an 85-83 lead late in the fourth. They couldn't hang on, however, and dropped their second straight game.
Kawhi Leonard opened the fourth with a three-pointer, giving the Spurs a 77-62 lead. But Wallace answered with a jumper, triggering a 16-2 Pistons run, which pulled the home team within one.
Late in the shot clock, Wallace hit the seventh three-pointer of his career to make it 79-70. Rodney Stuckey then converted a three-point play in between a baseline jumper and a trey from Jonas Jerebko and the Pistons trailed 79-78.
They took the lead, 85-83, on Brandon Knight's runout three-point play minutes later and Stuckey followed with a free throw for a three-point advantage.
Duncan, though, answered with four straight to put the Spurs back on top.
It was 91-91 when Parker took over. He began with a driving layup and, after Stuckey made 1-of-2 free throws, hit a running floater for a 95-92 lead with 27 seconds to play.
Ben Gordon then missed on a fadeaway baseline jumper out of a Detroit timeout and compounded the miss with a technical foul. Parker, who had already been fouled by Knight, made three straight free throws to put the game away.
Despite the loss, the Pistons competed intently. They were down 32-22 after one, but opened the second with a 12-3 run to make it 35-34. It was 49-44 in favor of San Antonio at the half and the margin stretched to 74-58 late in the third before Detroit began its late surge.