The Magic will gain the right to swap a future second-round pick with the Knicks in exchange for O'Quinn, sources say. Orlando also will obtain cash from New York.
O'Quinn has agreed on a four-year, $16 million deal with a player option for the fourth year, per sources.
Thursday is the first day deals can be officially consummated, after a leaguewide moratorium on roster business is lifted.
O'Quinn, a 6-foot-10 power forward/center, has established himself as a strong rebounder and a physical paint presence. Last season, he averaged 5.8 rebounds and 3.9 rebounds in 16.2 minutes per game.
The 25-year-old has grabbed 10.5 rebounds per 36 minutes over his three-year career. The Queens native projects as a backup power forward/center for New York.
The Knicks will likely have to use their remaining cap space to sign O'Quinn.
If so, the club will have the $2.8 million room exception and veterans minimum contracts to offer remaining free agents.
O'Quinn is the fourth free agent to agree to terms with New York.
The Knicks won a franchise-worst 17 games last season, and team president Phil Jackson said he'd use free agency to rebuild the team.
The club was unable to convince any of the top-tier free agents to come to New York. Free-agent big man LaMarcus Aldridge actually canceled a meeting with Jackson and the Knicks.
The hope for the Knicks is that the players they've obtained -- along with No. 4 overall draft pick Kristaps Porzingis -- can help them take a step forward from the disastrous 2014-15 campaign.