The 20-year-old's current contract was due to expire in the summer, but the Scottish side moved quickly to secure the youngster's future.
Rangers boss Ally McCoist spoke of his delight with Hegarty's new contract, describing him as "the future of the club".
McCoist said: "All the boys deserve a lot of credit for coming through and doing their best to make an impact on the team.
"Chris Hegarty has been one of those lads who has come in and been really, really solid and we can look at him and see just how much it means to him to pull on that blue jersey.
"In this day and age that's really important especially in our current climate so he deserves the extension to his contract. These lads deserve the reward for their efforts and hopefully they'll be the future of the club for years to come."