The Padres will send the Royals a player to be named.
Huber batted .346 (9-for-26) with five doubles, a triple and seven RBIs this spring. His last hit for Kansas City was a booming pinch-hit double on Tuesday night against San Diego.
"There are three things that always have to happen to make a team," Royals general manager Dayton Moore said. "They've got to have ability, which he has. You've got to perform, which he has. And the next thing is there has to be opportunity.
"And for us, the way our club was shaping up, we just didn't see any opportunity for him to be on our team. He was out of options, and I just wish we had more time, because he had a terrific spring and we think he's going to be a good hitter. It just didn't work out."
Huber, from Melbourne, Australia, was obtained by the Royals from the Mets for infielder Jose Bautista on July 30, 2004. A catcher then, Huber was injured the day before the trade and had to undergo knee surgery. The Royals transformed him into a first baseman and an outfielder.
In 2005, he led the Texas League in hitting with a .343 average and had 16 homers and 74 RBIs in 88 games. He spent most of the last two seasons with Triple-A Omaha, batting .278 and .276. Last year he battled injuries.
In parts of three seasons with the Royals, Huber batted .204 in 38 games.
"I hope he goes out and does great. He's a terrific person, and he works hard and he cares a lot about the Kansas City Royals," Moore said. "And we wish we could've had an opportunity for him, but we don't."
Dick Kaegel is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.