The deal sends right-handed starter Dillon Tate, left-handed starter Josh Rogers and righty reliever Cody Carroll to Baltimore.
Britton, 30, has amassed 139 saves for the Orioles since 2013. He was the top bullpen arm available on the market after Kelvin Herrera, Brad Hand and Jeurys Familia changed teams via trades since mid-June.
"I'm not there yet, so when I get in the clubhouse ... I know what the feeling's like when you're a winning ballclub and you get in that clubhouse, you can feel it," Britton said of joining the Yankees. "Hopefully, I can step right in and do a good job."
The Houston Astros, Boston Red Sox and Chicago Cubs were among several other clubs that had been pursuing Britton, who will take a streak of eight consecutive scoreless appearances with him to the Yankees.
Britton had ruptured his right Achilles during an offseason workout session and didn't make his 2018 debut until June 12.
He joins Aroldis Chapman, Dellin Betances and David Robertson as part of a Yankees bullpen that leads the major leagues with a 2.75 ERA and 448 strikeouts. Britton is the team's third reliever with 100 or more career saves, joining Chapman and Robertson.
Britton said he'll have no problem setting up Yankees closer Chapman.
"Yeah, I think you've got to go into a new team and earn your role, especially with the guys they have over there," he said. "They've got some guys who are doing really well. I'm just going to try to fit in and earn any role that's given to me.
"If you have a chance to chase a World Series ring, which obviously they do, it could be a once-in-a-lifetime opportunity."
Betances, meanwhile, said after Tuesday's 4-0 win over the Tampa Bay Rays that adding Britton is huge for the Yankees, as it allows manager Aaron Boone to further distribute the workload among the back end of the bullpen.
"Adding a guy like that, it's just pieces you can kinda play with," Betances said. "You don't have to go out there and pitch three days in a row, which -- I haven't done that all year; most of us haven't really done that -- so I think adding a guy like that even gives us more help. And we'll keep feeding off that energy back down there in the bullpen."
The deal also gives the Yankees a nod over American League rivals Boston and Houston, both of whom reportedly were pursuing the lefty.
"Those are teams that are top teams in the league," Betances said. "And adding a guy like Britton is powerful to any bullpen, so obviously getting him on our side ... it's huge for us."
The Orioles, a major league-worst 29-73, have embarked on a full-scale rebuild. They traded star shortstop Manny Machado to the Los Angeles Dodgers last week for five minor leaguers, and they are weighing offers for Jonathan Schoop, Kevin Gausman, Brad Brach and potentially Adam Jones and others in advance of the July 31 non-waiver trade deadline.
"I don't know if I'd say Adam Jones is on the market," Orioles executive vice president of baseball operations Dan Duquette said. "We decided with the Manny trade we were going to set off in a different direction so we could be competitive with these superteams in the American League East. And we are going to look at all the options. That means we have to look at all the options with the veteran players.
"Adam has a no-trade [clause], so anything the club would be interested in doing we'd have to involve Adam. We are not at the point where we have a deal and we'd have to sit down and talk to Adam about that. But the club is certainly looking at all the options."
Tate is the prime piece going back to Baltimore.
The Texas Rangers selected Tate with the fourth overall pick in the 2015 draft, then traded him a year later to New York for a package highlighted by Carlos Beltran. The 24-year-old is 5-2 with a 3.38 ERA in 15 starts with Double-A Trenton this year. Before the season, ESPN's Keith Law ranked Tate as the eighth-best prospect in the Yankees' system.
Carroll and Rogers also were in the 2015 draft class.
Carroll, taken by the Yankees in the 22nd round out of Southern Mississippi, was ranked as the team's No. 15 prospect by MLB Pipeline entering this season. In 32 relief appearances at Triple-A Scranton, the 25-year-old righty was 3-0 with nine saves and a 2.81 ERA.
Rogers was an 11th-round pick out of Louisville. The 24-year-old left-hander was 6-8 with a 3.95 ERA in 19 starts with Scranton.
"We were looking to acquire a left-handed starter and we got one in Josh Rogers, and two right-handers, hopefully a back-end reliever and a starting pitcher," Duquette said. "So that should add to the depth of the organization, and hopefully they're players we can rely on for years to come."
A former third-round pick of the Orioles in 2006, Britton was drafted as a starter. After moving to the bullpen at the beginning of 2014, he emerged as one of the most dominant relievers in the majors, recording a sub-2.00 ERA and 30-plus saves in three straight seasons.
In 2016, he went 47-for-47 in save opportunities, posted a 0.54 ERA and finished fourth in the American League Cy Young Award balloting. Despite Britton's regular-season success that year, manager Buck Showalter famously decided against deploying his closer in extra innings during Baltimore's wild-card loss to the Toronto Blue Jays, instead opting for starter Ubaldo Jimenez, who surrendered the winning runs.
Over the past two seasons, the 30-year-old southpaw has struggled to stay healthy. In 2017, Britton served two separate stints on the disabled list with a left forearm strain. This past December, he suffered the ruptured Achilles tendon.
Since making his season debut on June 12, Britton has a 3.45 ERA in 16 appearances, and he has converted four of five save chances. After a rocky start, the eight-year veteran has been more effective recently, working eight consecutive scoreless outings. During that stretch, he has allowed three hits over eight innings, striking out six and walking four.
"I don't know anything other than this organization," Britton said of the Orioles. "A lot of friends ... So, I'm definitely sad to be leaving. I'm looking forward to the opportunity to win some games again, but it's never going to be easy coming back here and playing against these guys especially."
Britton is a free agent after this season. He signed a one-year, $12 million deal earlier this year, avoiding arbitration.
The Orioles visit the Bronx for the start of a two-game series on Tuesday.
ESPN's Eddie Matz contributed to this report.