The deal will take up Harrison's final two arbitration-eligible years and his first three years of free agency.
The contract includes a $13.25 million option for 2018 that could go up by as much as $2.5 million depending on incentives. The option includes a $2 million buyout. Harrison can vest the option if he pitches 200 or more innings in each of the final three years of the contract.
Harrison will make $13 million combined in the first two seasons of the deal and then $13 million in each of the final three seasons.
Harrison, 27, won a team-high 18 games last season and has proven he can stay healthy and consistent the past two years, sporting a 3.34 ERA in nearly 400 innings. The left-hander pitched a career-high 213 1/3 innings last season. He declined an invitation to the upcoming World Baseball Classic so he could be sure he was well-rested and ready for 2013.
Harrison is expected to be the No. 2 pitcher in Texas' rotation, behind Yu Darvish.
The Rangers have made an effort in recent years to tie up some of their young starters so they have most of their rotation intact for the future.
Darvish, 26, signed a $56 million deal before last season that keeps him in a Texas uniform through the 2017 season, although the Japanese ace can become a free agent after 2016 if he finishes in the top two of the AL Cy Young voting twice over his next four years.
Derek Holland, 26, is signed through 2016 and has two club options that could make him a Ranger through 2018. The deal could end up at $45 million.
This means Texas' top three starters, at this point, are signed to long-term contracts.
Harrison has worked hard on his physical and mental game, getting stronger and avoiding injuries the past two seasons. He also has worked not to allow a bad inning or a bad outing to turn into a bad streak.
Harrison, an All-Star for the first time in 2012, said last week that he intends to work on his slider in spring training, something he calls his "fourth pitch." But he wants to use it more and increase his repertoire.