On February 16, 2016, İlyasova was traded to the Orlando Magic, along with Brandon Jennings, in exchange for Tobias Harris. The next day, he made his debut with the Magic in a 110–104 win over the Dallas Mavericks, recording 16 points, five rebounds, two assists and one steal in 23 minutes.
On June 23, 2016, İlyasova was traded, along with Victor Oladipo and the draft rights to Domantas Sabonis, to the Oklahoma City Thunder in exchange for Serge Ibaka. He appeared in three games for the Thunder to begin the 2016–17 season.
On November 1, 2016, İlyasova was traded, along with a conditional first-round pick, to the Philadelphia 76ers in exchange for Jerami Grant. He made his debut for the 76ers the next day, scoring an equal team-high 14 points on 5-of-12 shooting in a 109–93 loss to the Charlotte Hornets. On December 6, he had season bests of 23 points and 17 rebounds in a 96–91 loss to the Memphis Grizzlies. He had a second 23-point game on December 8 against the New Orleans Pelicans, and a third 23-point game on December 30 against the Denver Nuggets—both resulting in wins. On January 29, 2017, he scored a season-high 31 points in a 121–108 loss to the Chicago Bulls.