The Orioles received five prospects: outfielder Yusniel Diaz, right-hander Dean Kremer, third baseman Rylan Bannon, righty Zach Pop and third baseman Breyvic Valera.
"Obviously, it's a bittersweet day for our organization," Dan Duquette, the Orioles' executive vice president of baseball operations, said Wednesday night. "We watched Manny grow up in our franchise the past eight years. We all know what an exceptional talent he is, from the great plays that he made to his elite hitting. He's always going to be an important part of our club's history."
Machado, 26, is expected to be introduced by the Dodgers in Milwaukee on Friday before they open a series against the Brewers.
"We viewed Manny Machado as a big difference-maker," Dodgers general manager Farhan Zaidi said.
The Dodgers are in a close race in the NL West, leading Arizona by a half-game going into the second half of the season.
"Our first hope is we have a division-winning roster," Zaidi said. "Any time you have a chance to add an impact player in a tight division race, that's something you have to look at closely."
Machado's contract expires at the end of the season, and the last-place Orioles decided against negotiating an expensive, multiyear extension because they have too many holes on the roster as the team moves into rebuilding mode.
"We tried to maintain a competitive club this year, and that's why we resisted the offers we had in the offseason to trade Manny,'' Duquette said. "But when it became obvious that it was time to look to the future, trading Manny is the first step in the plan to rebuild our ballclub.''
Asked if the Dodgers would re-sign Machado, Zaidi demurred.
"Let's have him at least show up in a Dodger uniform before we start asking those questions," he said. "We hope he plays well and creates a good market for himself. We're not worried about what happens past 2018."
The deal hit a snag earlier Wednesday, according to multiple reports, with the Orioles having some issues regarding the physical of one of the prospects Los Angeles had agreed to send.
According to Fancred, the issue was not related to Diaz, the centerpiece of the deal.
Machado is off to the best start of his career offensively, tallying several career-high figures for the season's first half, including home runs (24), RBIs (65), OBP (.387) and OPS (.962).
In his first year as a full-time shortstop in the majors, Machado was voted as the starter for the American League in this year's All-Star Game.
A Platinum Glove Award winner and three-time All-Star at third base, Machado moved back to his original position this season.
Zaidi said Dodgers manager Dave Roberts has explained to Machado how much the team values flexibility and versatility in playing different positions.
"Manny being flexible with that and being able to move between shortstop and third, we believe he can be an asset at both those positions," Zaidi said. "When JT [Justin Turner] is down, Manny's ability and willingness to play third base on those occasions will be really important going forward. Everybody is sort of on the same page about that."
As for the prospects, Diaz, a 21-year-old Double-A outfielder, hit two home runs during Sunday's All-Star Futures Game. Alfonso Soriano is the only other player to hit two home runs in the Futures Game, doing so in 1999, the first year the game was played. On the season, Diaz is hitting .314 with a .905 OPS and has tallied 6 home runs, 30 RBIs and 36 runs scored.
"We liked the depth of the Dodger package, we liked the quality of the players in the package, and we liked Yusniel Diaz, a player we feel is a gifted hitter," Duquette said. "We felt he was clearly the best player offered to us during this recent market. He was the key to the trade. But the other players in the trade are also very talented."
Kremer, 22, is 6-3 with a 3.03 ERA and 125 strikeouts in 86 innings this season for Double-A Tulsa.
Bannon, a third baseman for the Class A Rancho Cucamonga Quakes, is hitting .296 with 20 home runs and 61 RBIs.
Pop has spent time in Class A and Double-A this season, compiling a 1.04 ERA over 43⅓ innings while striking out 47 and allowing just a .168 opponents' batting average. According to Duquette, Pop's and Kremer's "excellent seasons are indicative of their bright futures."
Valera, 26, is batting .284 with six home runs this season. Duquette said Valera will be optioned to Triple-A Norfolk, and the other four players will be sent to Double-A Bowie.
"Valera and Bannon are versatile fielders with excellent on-base skills," Duquette said.
Machado was limited to 82 games in 2014, but he has played at least 156 games in each of the past three seasons. He has hit at least 30 home runs and 30 doubles in each of those three seasons, making him one of just three players -- and the only one in the AL -- to reach both of those marks every season since 2015.
They had extensive conversations with the Phillies, whose front office is loaded with former Orioles officials who were involved in the drafting and developing of Machado in 2010 for Baltimore -- including president Andy MacPhail, general manager Matt Klentak and assistant GM Ned Rice.
The Associated Press contributed to this report.