The Pistons received a 2019 future second-round pick, sources said.
The Magic had room to acquire Meeks because they were $7.3 million below the cap.
Meeks signed a three-year, $19.5 million contract with the Pistons in 2014, but has played only 63 games in the past two seasons because of injuries.
Meeks developed into a three-point shooting specialist in his NBA career, which has included stops with Milwaukee, Philadelphia, the Los Angeles Lakers and Detroit.
Meeks played only three games in 2015-16 after suffering a foot fracture in the preseason.
More NBA coverage from The Vertical: