Bale, who was the world's most expensive player when he joined Madrid from Tottenham in 2013, is out of contract at the end of this month.
The Wales forward has played a key role in winning 16 major honours while in Spain, including a remarkable five Champions League triumphs.
Bale has scored three Champions League final goals, including a memorable overhead kick against Liverpool in 2018. Only Cristiano Ronaldo (four) has netted more.
But the 32 year-old was an unused substitute for Madrid's most recent triumph on Sunday (AEST) – again against Liverpool – and featured in only seven minutes during an epic European campaign.
Restricted to just seven appearances in all competitions after returning from a loan spell at Spurs, Bale's exit had long been anticipated.
In a post on Twitter, he wrote: "I write this message to say thank you to all my team-mates, past and present, my managers, the backroom staff and to the fans that supported me.
"I arrived here nine years ago as a young man who wanted to realise my dream of playing for Real Madrid. To wear the pristine white kit, to wear the crest on my chest, to play at the Santiago Bernabeu, to win titles and to be part of what it's so famous for, to win the Champions League.
"I can now look back, reflect and say with honesty that this dream became a reality and much, much more.
"To be a part of this club's history and to achieve what we achieved while I was a Real Madrid player, has been an incredible experience and one I will never forget.
"I also want to thank president Florentino Perez, Jose Angel Sanchez and the board for giving me the opportunity to play for this club.
"Together we were able to create some moments that will live forever in the history of this club and football. It has been an honour."