It is a two-year, $20 million contract with a player option after this coming season, sources told Stein.
Dallas and Atlanta had been in the hunt for Deng, as was Phoenix, who jumped into the mix on Saturday, according to sources.
Deng is entering his 11th NBA season, having spent almost his entire career with the Chicago Bulls. He was traded from Chicago to Cleveland in January after years of trade rumors.
The Heat plan to team Deng with the freshly re-signed Chris Bosh and soon-to-be-reupped Dwyane Wade in the wake of LeBron James' decision to return to his home-state Cleveland Cavaliers.
Sources close to the situation told ESPN.com's Marc Stein that the Heat on Sunday also came to two-year agreements to re-sign guard Mario Chalmers and center Chris Andersen, both are familiar faces from the Heat's run of four successive trips to the Finals. Chalmers' deal is said to be in the $8 million range while Andersen's is in the $10 million range, according to sources.
Chalmers took to Twitter to announce he was staying in Miami.
Proud to say I'm back wit the heat. Heat nation we still here
- Mario Chalmers (@mchalmers15) July 13, 2014Deng appeared in 40 games with the Cavaliers after the trade last season.
Deng has averaged 16.0 points per game in his career, after being chosen No. 7 overall from Duke in the 2004 draft.
In addition to agreements with Bosh and Deng, the Heat also have secured commitments from free-agent forwards Josh McRoberts and Danny Granger this offseason.
The Associated Press contributed to this report.