Andre Miller led the 76ers with 18 points, and Louis Williams had 16.
Richard Hamilton had 19 for Detroit, and Allen Iverson finished with 17.
The 76ers trailed by as many as 15, but pulled ahead 82-81 on Marshall's jumper with 2:50 left. Detroit scored the next four points, but Williams picked off Iverson's pass and hit two free throws to put Philadelphia back in front with 55 seconds left.
Rodney Stuckey's 17-foot jumper restored Detroit's one-point advantage, but Marshall answered with a 3-pointer to make it 91-89.
Iverson missed at the other end, Rasheed Wallace's tip-in bounced off the rim, and Williams hit five free throws in the final seconds.
Notes: Detroit's Jason Maxiell picked up a technical foul for elbowing Reggie Evans in the ribs in the fourth quarter. ... Wallace was 0-for-2 from the floor in the first three quarters, despite playing 21 minutes. ... Sixers rookie Marreese Speights made his first career start in place of Brand.