Perez is guaranteed $12.5 million. The deal also includes club options for 2018, 2019 and 2020.
Perez, who turns 23 just as next season begins, established himself as a full-fledged member of the Rangers' rotation this past season. He started 20 games and was 10-6 with a 3.62 ERA, striking out 84 and walking 37 while becoming a key cog down the stretch.
After ending the regular season tied for a playoff spot, the Rangers turned to Perez in Game 163 against the Tampa Bay Rays. He took the loss in that contest, allowing three runs and four hits in 5 1/3 innings.
Perez, long considered the club's top pitching prospect, posted a 5.45 ERA over 12 games in 2012 before finally living up to expectations last season.
The signing means the Rangers have four of their five projected 2014 starters signed to long-term deals.
Yu Darvish is inked through the 2017 season and Derek Holland's contract includes club options that could keep him a Ranger until the end of the 2018 season. Matt Harrison, who was injured most of last year after winning 18 games in 2012, is under contract through 2017 with a club option for 2018. And now Perez could be a Ranger until he's 29 years old.