The 26-year-old suffered the injury in Germany's 1-1 friendly draw with Italy and could be a doubt for next summer's World Cup finals in Brazil.
However, Germany team doctor Hans-Wilhelm Muller-Wohlfahrt believes Khedira could recover in time for the tournament.
"Sami has to be treated surgically, we have the hope that he will start the World Cup healthy," he told dfb.de.
Germany coach Joachim Low added: "This is a bitter blow for Sami and all of us. He is a very great fighter on and off the pitch.
"He always thinks positive, this will help him, and so I am optimistic that he will be back in time for the kick-off of the World Cup.
"We wish him all the best and keep our fingers crossed that the surgery goes well and he can quickly move into rehab."