The team announced the deal Thursday.
The 7-foot, 255-pound Melo played six games with the Celtics last season and averaged 1.2 points. He averaged 9.8 points, 6.0 rebounds and a league-high 3.1 blocks in 33 games for the NBA Development League's Maine Red Claws. Boston drafted the native of Juiz de For a, Brazil, with the 22nd pick overall in 2012 after he played two seasons at Syracuse.
The Grizzlies signed the 6-11 Greene on April 17 but did not appear in a game for Memphis. He has played 253 games over four seasons with Sacramento, averaging 6.1 points and 2.4 rebounds. Greene missed most of last season recovering from a broken ankle.