The 33-year-old, who joined the club last month, suffered the injury against Newport County on September 16.
Hill now expects to be back in action for the League Two side around March.
"I'm glad I've had the operation," he told the club's official website. "It's all about forward thinking now and looking ahead to getting back in action, hopefully in five or six months."
Tranmere continue their league campaign this Saturday when they travel to Carlisle United.