His bucket backed up double-doubles from Andre Drummond and Greg Monroe, and the Pistons rallied from 18 points down in the first half.
"We are getting better," Detroit coach Stan Van Gundy said. "If you stay in there, sometimes you get a break. We had a very good break at the end. We got lucky at the end. Our resolve to stay in the game right down to the last few seconds was huge."
Drummond had 20 points and 17 rebounds, and Monroe added 17 points and 11 boards, as the Pistons snapped a four-game skid in San Antonio (21-15). D.J. Augustin added 19 points for Detroit (11-23), which has not lost since waiving Josh Smith on Dec. 22.
San Antonio point guard Tony Parker played just 13 minutes in his return from a five-game absence due to a strained left hamstring. He was 0-for-3 shooting and had just two assists, but he did not appear to aggravate the injury.
"He wanted to play, but I'm being conservative," coach Gregg Popovich said. "He had 13 minutes. That's good after sitting out as long as he did; make sure he doesn't reinjure the thing."
Parker had missed 13 games total due to the injury, returning twice for a single game only to aggravate his hamstring. The Spurs were 6-7 in Parker's absence.
It was part of an odd night for the defending NBA champions. The Spurs rallied behind five 3-pointers in the fourth quarter but were 4-for-7 on free throws in the final two minutes.
San Antonio opted to intentionally foul Detroit's Jodie Meeks after Patty Mills made one of two free throws with 10.8 seconds left to give the Spurs a 104-101 lead.
Charging Ahead Without Josh Smith The Pistons have been a top-three team offensively and defensively since waiving Josh Smith and have gone 6-0 after starting 5-23. A look at their turnaround since Dec. 22: Popovich was succinct when asked why he fouled in that situation. "Because I wanted to," he said. Meeks made both shots, pulling the Pistons within 104-103 with eight seconds remaining. Those final eight seconds were the only time Duncan was on the court in the final quarter.
"I made different choices," Popovich said of his decision to sit Duncan.
Duncan's inbounds pass went off Mills' hands and was gathered by Kentavious Caldwell-Pope, who passed it to Jennings. Unsure whether there was a timeout remaining, Jennings charged down the court.
"Once I got to the frontcourt, I was open for the 3, but I was like, 'I'm not going to shoot the 3,'" Jennings said. "Once I saw (Boris) Diaw get on the outside, I've got a good opportunity to go past him, and I shot the floater off the glass."
After an official review, 0.1 second was placed on the clock, but the Spurs were unable to tip the ball before time expired.
Jeff Ayres had a season-high 16 points and Duncan added 15 for the Spurs.
After trailing by 18 points early in the second quarter, Detroit opened the third on a 23-11 run to take its first lead of the game. The surge included a 10-0 run capped by a pair of free throws by Monroe for a 72-69 lead with 5:11 remaining.
TIP-INS
Pistons: Detroit is averaging 108.4 points in its past five games, exceeding its season average of 96.5. ... The Pistons held their previous five opponents to less than 45 percent shooting. San Antonio shot 46 percent. ... Detroit is averaging 8.5 3-pointers per game, which would eclipse the franchise high of 7.1 set in 1997 should it hold.
Spurs: Popovich continued to use mass substitutions, replacing his entire lineup on several occasions in an effort to keep his team fresh. ... Duncan was issued a technical foul with 5:31 remaining in the third quarter after screaming at Kane Fitzgerald over a non-call on his runner in the lane. ... C Aron Baynes (neck spasms) was a late scratch, sitting out his first game due to injury.