Rodney Carney had 13 points and Jason Smith added 12 for the 76ers (5-3), who will start their season on the road on Wednesday at the defending Eastern Conference champion Orlando.
The Nets led by 25 points in the fourth quarter of the game played at St. John's Carnesecca Arena.
Philadelphia missed its first seven shots of the game and the Nets ended the first quarter with a 26-18 lead.
Williams, a first-round draft pick from Louisville, had an assist on Jarvis Hayes' 3-pointer and then stole the ball from Louis Williams, racing down court for a one-handed dunk. He then had a ball tipped to him on a jump ball and fed Courtney Lee with a behind-the-head pass for a dunk and would later set up Brook Lopez for a dunk, also from the top of the key, all in the third quarter.
NOTES: New York Knicks G Nate Robinson was among the 3,284 fans in attendance. He stood and clapped after several dunks by Terrence Williams, a close friend of his.