Baynes fills an immediate need for Toronto at center with the departure of Marc Gasol to the Los Angeles Lakers.
Chris Boucher also agreed to a two-year, $13.5 million deal to stay with the Raptors, his agent, Sam Permut, told ESPN's Adrian Wojnarowski.
Baynes, who hails from Australia, is coming off arguably the best season of his eight-year NBA career, averaging a career-high 11.5 points and 5.6 rebounds while showing a long-range shooting touch for the first time. His 1.4 3-pointers and 35.1% shooting from deep were both career highs.
But when Phoenix resumed its season inside the NBA bubble in Orlando, Florida, Baynes wasn't part of it. He tested positive for COVID-19 and remained in Arizona as the upstart Suns went 8-0 in the bubble, only to fall just short of the playoffs.
Baynes was a beloved figure in Boston from 2017 to 2019, giving the Celtics a high-energy, tough-nosed presence in the paint. But he was part of a 2019 draft-night trade to Phoenix that helped Boston clear cap space for free agent Kemba Walker and gave the Suns a veteran presence who went on to fill in admirably for Deandre Ayton while the 2018 No. 1 overall pick served a 25-game suspension early in the campaign.
Baynes, who turns 34 on Dec. 9, spent three seasons with the Spurs and two with the Pistons earlier in his career.
Boucher made strides and was able to crack the Raptors' rotation this past season, his second with the team. He averaged 13.2 minutes in 62 games, with 6.6 points, 4.5 rebounds and 1.0 blocks.
A 6-foot-9 power forward with great bounce and a big wingspan, he can defend on the perimeter but has struggled to shoot from there, connecting on just 32.1% of his attempts from 3-point range while averaging close to 2.0 attempts for his career.
He got a late start in basketball, then tore his ACL late in his senior season at Oregon, so while he turns 28 in January, this will be just his fourth NBA season.
Boucher is a restricted free agent, meaning the Raptors had the right to match any offer for him.
Bembry was the Hawks' first-round pick (21st overall) in the 2016 NBA Draft. He's started 23 games over the last four seasons with Atlanta.
This past season, he averaged 5.8 points and 3.5 rebounds in 43 games (four starts) for the Hawks.