Ahmed has been on the disabled list since July 22, but the hip had bothered him for months before that.
Ahmed received an anti-inflammatory shot around 10 days ago and recently restarted baseball activities, but he told D-backs manager Chip Hale that his hip was preventing him from getting any power off it.
"It was more up to him," Hale said. "The truth is if he felt like he could play and be close to 100 percent we would have brought him back to play, but this is probably, long-term, the best thing for him."
Ahmed is expected to be ready to go when Spring Training opens next year.
Ahmed was hitting .218 at the time of the injury, but his greater value has always been on defense where he is regarded as one of MLB's best shortstops.