The 33-year-old joined the Brussels club at the age of six, and his career has now come full circle after a trophy-laden stint at City.
He announced on his Facebook page: “I choose to be grateful for the past but remain ambitious and driven for the future.
“For the next three years, I will take up the role of player-manager of Anderlecht. Belgium’s finest.
“This may come as a surprise to you. It’s the most passionate yet rational decision I’ve ever made.”
Kompany revealed that he had met with Anderlecht chairman Marc Coucke and sporting director Michael Verschueren last summer.
“I shared my thoughts and listened to their vision for the future: ambitious, courageous and determined to get back to number one,” he wrote.
“I offered my help, no strings attached, should they need it.”
Kompany says he was then offered the player-manager job in the last few weeks.
“I want to share my knowledge with the next purple generations,” he continued.
“With that, I will also put a bit of Manchester in the heart of Belgium. This is no goodbye. It’s a see you later.”
Know more about Sport360 Application