Both teams are currently out of playoff position and have been looking to get back in. With Harris, who is averaging 13.7 points and 7.0 rebounds this season, the Pistons get a young power forward with shooting range, but the team will also take on the rest of the four-year, $64 million deal he signed last year.
Harris, 23, is excited about the move.
"I'm ready to make the playoffs!" Harris said in a text message to ESPN.
Detroit is 27-27, a half-game behind Charlotte in the competition for the eighth and final playoff spot in the Eastern Conference. The Pistons expect Harris to bolster their chances of reaching the postseason for the first time since 2009.
Detroit has been looking for an upgrade from Ilyasova at power forward and had talks with the New Orleans Pelicans about Ryan Anderson, sources said. Harris is much younger than Ilyasova and Anderson, though his scoring has dropped about four points a game and his 3-point shooting has dipped to 31 percent.
"This is a move that can be looked at as a long-term move, as one that will fit with our core group of players, and we'll be able to keep them together," Detroit general manager Jeff Bower said.
The Magic, who had one of the youngest rosters in the league, get veterans to help with a run toward the playoffs, which first-year coach Scott Skiles has been pushing for in recent weeks. They are expected to have additional trade talks about adding more veteran players, sources told ESPN.
At 23-29, Orlando is 3 games behind Charlotte for the eighth seed.
"I think we're right in striking distance for a playoff spot," Magic GM Rob Hennigan said. "We feel like our team has played well the last few games, and we just have to sustain that momentum and add to that momentum. The goal is to make the playoffs and the goal is to win, and that's what we're trying to do.
"We see Brandon and Ersan as really good fits, both short-term and long-term for us. We also were able to open up some flexibility this summer in the cap-space realm, if we decided to go that route. It sets up a few different ways we can play this."
Ilyasova and Jennings played for Skiles when he was the coach of theMilwaukee Bucks.
"I'm happy to reconnect with [Coach] Skiles," Jennings told ESPN on Tuesday.
Orlando had been looking for a point guard as Elfrid Payton works through his growing pains. Jennings, a starter for most of his career, should strengthen the Magic backcourt.
Jennings has played in 23 games since returning from a torn Achilles tendon. Seeing action as a backup, he is averaging a career-low 6.8 points and 3.0 assists in 18 minutes a game. He is in the final year of his contract, which pays him $8.3 million.
Ilyasova is averaging 11.3 points and 5.4 rebounds in 52 starts. His contract for next season is non-guaranteed at $8.4 million. If the Magic don't keep him, this trade will have cleared more than $17 million from their books for next season.
The Associated Press contributed to this report.
Pistons deal Jennings, Ilyasova for Magic's Harris
ESPN Front Office Insider Amin Elhassan breaks down the trade that sent Tobias Harris to the Pistons and Brandon Jennings and Ersan Ilyasova to the Magic.