The Rangers acquired right-handed pitcher Spencer Patton, who has spent the entire season at Triple-A Omaha, in exchange for Frasor, who was 1-1 with a 3.34 ERA in 38 appearances this season.
Patton, 26, has a 4-3 mark and a 4.08 ERA this season, converting 14 of 15 save chances. He was picked to play in Wednesday night's Triple-A All-Star Game and will participate as scheduled before reporting to Round Rock, the Rangers' Triple-A affiliate.
The 36-year-old Frasor will help solidify the Royals' middle relief for a bullpen that is strong in the back end thanks to setup man Wade Davis (1.13 ERA, 17 holds) and closer Greg Holland (1.82 ERA, 25 saves).
Frasor will be a free agent after this season.
The Royals, at 48-46, are in second place in the AL Central, 6.5 games behind the first-place Detroit Tigers. The Rangers (38-57), meanwhile, are in retooling mode, mired in last place in the AL West, 21 games behind the first-place Oakland Athletics.
The Associated Press contributed to this report.