Now the healing begins.
Panthers coach John Fox revealed the news after Saturday's practice.
Hartwig went on injured reserve Nov. 24, ending his disappointing season. The injury kept him out of all but two games this season. Rehab is expected to take eight to 10 weeks, but the Panthers hope to have Hartwig back at full speed next season.
"We could have waited until the end of the season to have surgery. Now we've decided it just wasn't coming along, so he'll have it now," Fox said last week.
The Panthers gave the former Titan a five-year, $17 million free-agent deal in the offseason -- one of the richest contracts for a center in the NFL -- to replace the aging Jeff Mitchell, who wasn't re-signed.
But Hartwig missed a portion of training camp after undergoing hernia surgery and then strained his groin in the season opener against Atlanta. After sitting out six games, he played sparingly against Dallas on Oct. 29. He then reinjured the groin lifting weights a few days later and hadn't played since.
Two weeks ago, Hartwig said he believed the groin injuries were related to the hernia and said he was contemplating surgery.
"He came in here with big plans in terms of contributing but just never got healthy," Fox said. "Now we just have to get him healthy for next year."
Information from The Associated Press was used in this report.