Meche was 11-8 with a 4.48 ERA last season for the Mariners.
The five-year package was believed to be worth about $11 million a year for Meche, bringing him up to the level being paid to designated hitter Mike Sweeney who had the team's top salary.
Meche will be considered as a potential No. 1 starter, according to general manager Dayton Moore.
"He fits in with our long-term plan. He's the guy that we focused on. He's the youngest guy out there with the best raw stuff entering the prime of his career," Moore said.
At 28, Meche fits into the profile of team built around young players such as Mark Teahen, David DeJesus, Ryan Shealy, Zack Greinke and others.
"He's a guy who can anchor our pitching staff going forward," Moore said.
The announcement of the signing came on the last day of the Winter Meetings in Florida where the Royals were among the most active clubs.
Moore vowed the Royals' dealings would not end with the wrapup in Florida. He said the club was still pursuing trade options and such free-agent pitchers as Miguel Batista.
At Thursday's Rule 5 Draft, the Royals took Joakim Soria, a pitcher from the San Diego Padres organization. At the same time, the Royals announced the release of Hernandez, who was 6-10 with a 6.48 last season.
"We knew we had a deal with Gil and we felt strongly about drafting in the Rule 5 with Soria," Moore said. "You look at his numbers and they're unbelievable."
Soria, with the Mexico City Reds last season, had a 3.65 ERA with 15 saves in 39 relief appearances.
"Not that we're going to make him a closer, but the great thing about him is he can compete for a variety of roles," Moore said.
Soria currently is starting for Obregon in the Mexican Winter League and has an 8-0 record and 2.02 ERA in 10 starts.
"And Bannister is a quality makeup guy with a lot of pitching skills and we see him competing for our starting rotation as well," Moore said.
With Odalis Perez, Luke Hudson and possibly Greinke also in the rotation, the Royals decided to cut loose Hernandez. He had a rocky season which began at Triple-A Omaha after he reported to Spring Training overweight.
In four years with the Royals, Hernandez had a 25-33 record in 78 games. His cumulative ERA was 5.38 and he never really fulfilled the promise held for him.
"We just felt based on some of the things we were doing, that we had some other options that fit better," Moore said. "Runelvys worked hard to get back to the Major Leagues and we were very appreciative of that work ethic. I spoke to him and he was very professional and thanked us, and I thought we had a good conversation."
Moore said nothing materialized on the trade front for Hernandez.
Meche, a right-hander, is known as a power pitcher with a lively fastball that reaches 94 mph, a knuckle curve and a changeup.
From Lafayette, La., he was a first-round draft pick of the Mariners in 1996. His biggest year was 2003, when he had a 15-13 record and 4.59 ERA in 32 starts. That came after Meche missed two big-league seasons because of rotator cuff surgery.
Mech was The Sporting News Comeback Player of the Year. He was the first pitcher to win 14 games after missing two straight seasons since 1956 when Vinegar Bend Mizell was 14-14 for the St. Louis Cardinals. Mizell was out in 1954-55 for military service.
Meche's career record for the Mariners was 55-44.