"Everybody at Stamford Bridge would like to express our enormous gratitude to John and wish him the very best of luck for the future," the league leaders announced in a statement through its official website.
John, 36, has played 713 matches for Chelsea since his debut in 1998, scoring 66 goals. He is the club's third highest all-time appearance-maker and has captained Chelsea a record 578 times.
He has spent most of the season on bench under manager Antonio Conte and vows to take new challenges elsewhere.
Terry said: "After 22 years there is so much to say and so many people to thank at this great football club. From coaches, team-mates and staff to the fans who have given me so much support down the years, I can't thank you enough. There will be opportunities for me to speak further about this over the coming weeks.
"I will decide on my future in due course, but for now I am committed to helping the team achieve success this season.
"I've always been conscious that I depart at the right time, in the right way, and I feel that the end of this season is the right time for the club and I. I feel I still have plenty to offer on the pitch but understand that opportunities here at Chelsea will be limited for me.
"I'm eager to carry on playing and so will be looking to continue with a new challenge. I will of course always be a Blue and am desperate to end my final season as a Chelsea player with more silverware."
Terry has won the Champions League, four Premier League titles, the Europa League, five FA Cups and three League Cups. His 14 major honours make him our most decorated individual of all time.
Chelsea director Marina Granovskaia said: "He will always be held in the highest regard by everybody at Stamford Bridge and we look forward to welcoming him back in the future."