Kompany, 33, has won four Premier League titles since joining the club in 2008, together with two FA Cups, four League Cups and two Community Shields.
He played in 360 games for the club, scoring 20 goals – his last being a thunderous game-winner against Leicester in a crucial match for this year’s title race.
But the Belgian’s last four seasons were marred by various injuries, seriously reducing his impact on the team.
The centre-back is yet to reveal plans for his future.
But City have announced Kompany’s testimonial match will be played in September.
IN GOOD KOMPANY
In an open letter to the fans, the club icon wrote: “We’ve just seen the close of an incredible season. My 11th as a Blue.
“And I cannot believe I’m writing this but … also my last as a Blue.
“The time has come for me to go now. As overwhelming as it is, I feel nothing but gratefulness.
“Sheikh Mansour changed my life and that of all the City fans around the world, for that I am forever grateful.
“It’s cliché to say it but it’s also so true: without my teammates I would have never been here today.
“To all of you, from the 2008/09 squad to today’s domestic Treble winners: I owe you guys!
“A special word also to Pep and the backroom staff: you’ve been superb.
Meanwhile, City chairman Khaldoon Al Mubarak said: “There have been many important contributors to Manchester City’s renaissance, but arguably none are more important than Vincent Kompany.
“He defines the essence of the club. For a decade he has been the lifeblood, the soul, and beating heart of a supremely talented squad.