Hegarty's current contract was set to expire in the summer and the 20-year-old has put pen to paper on a two-year extension.
Hegarty follows in the footsteps of youngsters Robbie Crawford, Barrie McKay and Lewis Macleod in extending their stays at Ibrox.
Manager Ally 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."
Hegarty said: "I'm over the moon. It's a great Valentine's Day present as I've always loved the club so I'm so happy.
"Words can't say how delighted I am to be staying at such a big club and hopefully I can be part of the journey that gets Rangers back to where we belong.
"I'm so grateful to the manager for giving me the opportunity to show what I can do and without those games I wouldn't have had the chance to sign this contract."