The 36-year-old batter will return to India to prepare for the upcoming domestic season.
Leicestershire will lock horns with Northamptonshire on Tuesday, September 17, before facing Derbyshire in their last match this summer.
"I have absolutely loved my time with Leicestershire. We played some fantastic cricket, and there a lot of promising signs for the team heading into next season," Rahane said in a statement.
"I have thoroughly enjoyed playing alongside my teammates and working with the coaches to improve my game. It was also a pleasure to meet the Leicestershire supporters and witness their passion for cricket. Everybody made me feel incredibly welcome, and I would love to return to the Club again in the future," Rahane added.
Claude Henderson, the director of Leicestershire cricket, said, "We're disappointed to lose Ajinkya slightly earlier than planned, but we have to respect the judgement of our medical team and acknowledge this will present an opportunity for another member of our squad to step up and score runs.
"Ajinkya has been a fantastic addition to our changing room and imparted some invaluable knowledge onto our players. It was a pleasure to see how he conducted himself on and off the pitch and he will always be welcome back at Leicestershire."
Ajinkya Rahane impresses for Leicestershire
Rahane made his debut at Uptonsteel County Ground at the start of Leicestershire's One-Day Cup campaign, where he notched 71 runs against the Nottinghamshire Outlaws.
Throughout the tournament, he accumulated 378 runs across 10 innings, averaging 42, and helped the Foxes advance to the semi-finals.
In addition, Rahane amassed 202 runs from three Vitality County Championship matches, including a standout century against Glamorgan earlier this month.