The White Sox received outfielder Blake Rutherford, who was New York's 2016 first-round pick. They also got left-handed pitching prospect Ian Clarkin, minor league outfielder Tito Polo and Yankees right-handed reliever Tyler Clippard, whose contract helps offset some of the money in Frazier's and Robertson's deals. Clippard is in the second year of a two-year, $12.25 million deal.
Frazier, who is from New Jersey, said it is "kind of surreal" to be going home.
"It all happened at once. You hear rumors that it could be a different team here and there, but it's the Yankees, so I'm pretty excited," he said.
"To get back in a pennant race, it's a great opportunity for me to showcase what I got. I see the team that they have, and they have a really good team."
Frazier, Robertson and Kahnle were added to the active roster for the Yankees' game at Minnesota Wednesday afternoon, but Frazier was not in the starting lineup. In corresponding moves, the team optioned left-hander Chasen Shreve to Triple-A and designated infielder Ji-Man Choi and infielder/outfielder Rob Refsnyder for assignment.
White Sox general manager Rick Hahn said Rutherford was the key player in the deal and that he had been talking with the Yankees for a long time.
"Over the last several weeks, we've had discussions with teams about these players. But we decided the most prudent path to acquire the most impactful talent was to bundle these players together," Hahn said.
Hahn also announced top prospect Yoan Moncada -- acquired from the Boston Red Sox in the Chris Sale deal last offseason -- is being called up and will be in a White Sox uniform for the first time Wednesday night against the Los Angeles Dodgers.
This is the second big trade in a week for the White Sox -- who are in last place in the American League Central -- ahead of the July 31 non-waiver trade deadline. On Thursday, they sent ace Jose Quintana to the crosstown Chicago Cubs for four minor leaguers.
Hahn said the White Sox are still open for business.
"We're starting to get a little bit younger in that clubhouse," he said.
Robertson, once the Yankees' closer, is being paid $12 million this year and is due $13 million next season. He and Kahnle will be counted on to help a bullpen that has been inconsistent.
"Those are two power arms who have strikeout stuff, and [are] just adding to what we got," Yankees manager Joe Girardi said.
Robertson expressed excitement about rejoining the Yankees.
"I know everyone who is over there, so it'll be like going home. My son was born there," he said.
Frazier, who is on a one-year, $12 million deal, is expected to play first or third in a combination with current third baseman Chase Headley, but Girardi said he hadn't yet made a decision. Headley said he would be able to play first, if asked.
Girardi said the fact that the Yankees are making additions should send a message to his clubhouse.
"It should tell them, 'Hey, we are in this, and we need to continue to play hard and play better than what we've done,'" Girardi said. "It should be a pick-me-up."
The Yankees currently hold the second AL wild-card spot and are close to the AL East-leading Red Sox.
Frazier was pulled from the White Sox's starting lineup shortly before Chicago hosted the Dodgers on Tuesday night. He spent the early part of the game in the dugout, talking to Robertson.
Frazier, 31, is hitting .207 with 16 homers and 44 RBIs in his second season with the White Sox. A two-time All-Star while with the Cincinnati Reds, Frazier had 40 homers and 98 RBIs while hitting a career-low .225 for Chicago in 2016.
Robertson, 32, has a 2.70 ERA and 0.96 WHIP in 31 games this season (28 finished). He is 13-for-14 in save opportunities and has struck out 47 batters over 33⅓ innings. Robertson signed a four-year, $46 million deal with Chicago as a free agent prior to the start of the 2015 season.
The right-hander pitched for the Yankees from 2008 to '14 and posted a 2.81 ERA in 402 games. He took over as the team's closer following Mariano Rivera's retirement.
Kahnle, 27, is 1-3 with a 2.50 ERA in 37 appearances for the White Sox. In 36 innings, the right-hander has allowed 28 hits and seven walks, while striking out 60. He originally was drafted by the Yankees in 2010 but was lost to the Colorado Rockies in the Rule 5 draft and later acquired by the White Sox.
Clippard was 1-5 with a 4.95 ERA in 40 games. The 32-year-old righty had hit a rough patch recently, and this is the fourth time he has been traded in less than three seasons.
"I didn't expect it, but it is part of the business," he said. "Unfortunately for me, it has been part of my seasons the last three years, so from a lifestyle standpoint, it is getting kind of frustrating, and, from a team standpoint, I love these guys. I love this organization. We are playing well. We are in thick of things. To leave, it is gut-wrenching."
Rutherford, 20, was hitting .281 with 30 RBIs and 25 stolen bases at Class A Charleston. He was a South Atlantic League All-Star this year after being a first-round draft pick.
Clarkin, a 22-year-old lefty, was 4-4 with a 2.61 ERA as a starter at Class A Tampa. The 22-year-old Polo was hitting a combined .307 with 22 steals at Tampa and Double-A Trenton.
Moncada, a 22-year-old infielder, is hitting .282 with 12 homers, 36 RBIs and 17 stolen bases at Triple-A Charlotte. Boston spent $63 million -- including a record $31.5 million bonus -- to sign Moncada in 2015 after he left Cuba, and he recently was named the top prospect in the game by Baseball America.
"There's going to be growing pains here. He's not a finished product," Hahn said. "I don't suspect any of these players as they make their debut here in the coming months and years, no matter how highly anticipated they may be, there's still going to be an element of development that's going to happen in Chicago."
ESPN's Andrew Marchand and Bradford Doolittle and The Associated Press contributed to this report.