The Belgian made the announcement via an open letter to supporters posted to Facebook on Sunday:
BBC Sport's Emma Sanders relayed the letter:
Kompany said he would make a further announcement on his future in a second part of the letter.
"We've just seen the close of an incredible season," Kompany wrote. "My 11th as a Blue. And I cannot believe I'm writing this but ... also my last as a Blue. Countless of times have I imagined this day, after all, the end has felt nearby for so many years."
He added: "The time has come for me to go now."
The centre-back made 360 appearances for the club after he arrived from Hamburger SV in 2008.
During that time, he won four Premier League titles, two FA Cups and four League Cups at the Etihad Stadium.
This season, he helped City become the first men's side in English football to complete a domestic treble of all three major trophies.
Man City paid tribute to their skipper on Twitter:
Stuart Brennan of the Manchester Evening News and BBC Sport's Phil McNulty hailed the Belgium international as a player and a leader:
Stuart Brennan @StuBrennanMEN
Just woken to the news that @VincentKompany is leaving #MCFC . Suffice to say that replacing him will be a huge ask - incredible footballer, colossus of a leader, eloquent spokesman and above all a top-class human being. It's been a pleasure dealing with him for the last 10 years
Phil McNulty @philmcnulty
Vincent Kompany to leave Manchester City. Magnificent player. Inspirational leader. One of the true greats of the Premier League era - and that spectacular winning goal against Leicester City that did so much to win his final Premier League title as one of his parting shots.
The Times' Henry Winter and Goal's Charles Watts are hoping Kompany, who has a Master's degree in Business Administration, takes up a role with the Football Association if he opts to retire this summer:
Kompany was in the final year of his contract with City, and departing on the back of the treble allows him to leave on a virtually unrivalled high.
The defender turned 33 in April and his age and injuries have taken their toll in recent years—he is no longer the force he once was.
Kompany only managed to play more than 30 league games in three of his 11 seasons at the Etihad, and he made no more than 17 league appearances in his final four campaigns at the club.
His departure will allow City to freshen up their back line with someone in or approaching their prime.
The difficulty will be finding another player who can lead the team with Kompany's authority, and that will have to be one of their priorities ahead of next season.