In exchange, the Yankees received a package of four prospects -- outfielder Clint Frazier, left-hander Justus Sheffield and right-handed pitchers Ben Heller and J.P. Feyereisen.
The Yankees had been entertaining offers for Miller after they traded closer Aroldis Chapman to the Chicago Cubs last week.
Miller, 31, has gone 6-1 with nine saves and a 1.39 ERA over 45 1/3 innings in 44 relief appearances this season for the Yankees. He currently owns the sixth-lowest relief ERA. He owns an 11:1 strikeout-to-walk ratio, is averaging 15.3 strikeouts per nine innings pitched and is second in the league with 77 relief strikeouts. He has allowed runs in just eight of 44 outings and has not allowed multiple runs in an appearance this season.
Miller has a career relief ERA of 2.72 in 297 career appearances with the Detroit Tigers, Florida Marlins, Boston Red Sox, Baltimore Orioles and Yankees. He was Detroit's first-round pick (sixth overall) in the 2006 draft out of the University of North Carolina.
Miller is signed through the 2018 season with more than $21 million left on his contract.
Frazier and Sheffield, the nephew of former Yankees slugger Gary Sheffield, are considered two of Cleveland's top prospects.
Frazier, 21, was picked in the first round (fifth overall) by Cleveland in the 2013 draft. He is hitting a combined .273 with 13 home runs and 48 RBIs in 94 games this season at Double-A Akron and Triple-A Columbus. He is hitting .238 in 21 at-bats since recently being promoted to Columbus.
Sheffield, 20, was selected by Cleveland in the first round (31st overall) of the 2014 draft. He is 7-5 with a 3.59 ERA in 19 starts for Class A Lynchburg in 2016.
Heller, 24, is a combined 3-2 with 12 saves in 13 chances and a 1.73 ERA in 43 relief appearances at Columbus and Akron, holding batters to a combined .159 batting average.
Feyereisen, 23, is 4-3 with a 2.23 ERA and five saves in 33 relief appearances for Akron and was named to the 2016 Eastern League Mid-Season All-Star team.