The White Sox sent Cabrera and cash to Kansas City for a pair of Single-A pitchers, 22-year-old right-hander A.J. Puckett and 23-year-old lefty Andre Davis. The swap came before Monday afternoon's deadline for making deals without waivers.
''It's a quality bat, a switch-hitting bat, a bat we can put in the 2-hole in our lineup,'' Royals manager Ned Yost said. ''It's a great trade for us.''
Kansas City holds the second AL wild-card spot. The Royals moved to two games behind AL Central-leading Cleveland after beating the Red Sox 5-3 on Sunday.
''I will go there try to help the team win games,'' Cabrera said before the White Sox hosted the Indians. ''They acquired me for a reason. I hope to help them.''
The Royals had their season-high nine-game winning streak snapped by Boston on Saturday night, losing 9-8 in 10 innings.
The 32-year-old Cabrera was batting .288 with 13 homers and 56 RBIs for the White Sox. He's also is tied for the majors' lead with nine outfield assists.
The switch-hitting Cabrera is in his 13th season in the majors. He played for the Royals in 2011.
Alex Gordon knows he'll fit right back into the clubhouse.
''He's going to help our team a lot,'' he said. ''He's having a great year. He's been here before. A lot of guys have seen him and knows the kind of personality he has - smiling and a happy-go-lucky guy that brings a lot of energy to the clubhouse so we're excited to get him.''
With San Francisco, he was the MVP of the 2012 All-Star Game at Kansas City's Kauffman Stadium.
Cabrera rejoins a few former teammates with the Royals - first baseman Eric Hosmer, shortstop Alcides Escobar, catcher Salvador Perez and manager Ned Yost.
''I played with Hosmer, Salvy, Escobar and I played for the manager Yost,'' he said. ''They treated me fair there.''
Cabrera said he enjoyed his two-plus seasons with the White Sox.
''Honestly, I wasn't expecting this because I love the city,'' he said. ''I love the team.''
For the White Sox, it's another move of regular players, trying to rebuild.
In the last year, they've traded starting pitchers Chris Sale and Jose Quintana, along with outfielder Adam Eaton, third baseman Todd Frazier, and relievers David Robertson, Tommy Kahnle, Anthony Swarzak and Dan Jennings.
''As we've made no secret about over the last several months, we're preparing ourselves for the future,'' Chicago general manager Rick Hahn said. ''With today's move, we were able to pick up another couple interesting arms for the organization.''
Puckett was Kansas City's second-round draft selection in 2016 and Davis was picked in the eighth round in 2015.
AP freelance writer Matt Schoch contributed to this story from Chicago.