Gregorius, 29, returned from Tommy John surgery in early June and recorded a .238 batting average with 16 home runs and 61 RBIs in 82 games. He was considered one of the Yankees' top players before requiring ligament reconstruction in his right elbow after suffering an injury while making a throw against the Boston Red Sox in the 2018 AL Division Series.
From the 2016 season to 2018, Gregorius averaged more than 20 homers per season and set a new Yankees single-season record for home runs by a shortstop with 27 in 2018. He also recorded a career-high 87 RBIs in 2017 and 86 in the next season.
The move will reunite Gregorius with current Phillies manager Joe Girardi, who served as the Yankees' skipper for 10 seasons (2008-17). Philadelphia previously signed prized free-agent pitcher Zack Wheeler earlier this month.