Okafor, 21, was drafted third overall by Philadelphia in 2015.
After averaging a career-high 17.5 points and seven rebounds over 53 games and being selected to the All-Rookie first team in the 2015-16 season, Okafor has appeared in just two games this season for the Sixers, averaging 5.0 points and 4.5 rebounds.
Last month he told ESPN he would like the 76ers "to just send me somewhere where I can get an opportunity".
The 76ers, who had already declined their team option on Okafor for next season obliged with the trade for Booker.
"Trevor Booker has been a solid and competitive two-way contributor at every NBA stop. Trevor's abilities should complement our style of play and his experience should add to our bench depth with playoff contention in mind," 76ers president of basketball operations Bryan Colangelo said in a statement.
Nets general manager Sean Marks was upbeat about welcoming two young players to their club.
"This trade provides us with a good opportunity to bring in two young players who were high picks in recent drafts and give them a chance to succeed in our system," Marks said.
Booker, 30, is averaging a career-best 10.1 points per game and 6.6 rebounds through 18 games this season. The eighth-year pro has career averages of 7.1 points and 5.7 rebounds.