Fernando, who signed for Manchester City in a reported £12m deal in 2014 from Porto, made more than 100 appearances in his three seasons at the club.
However, the 30-year-old Brazilian found opportunities limited under Pep Guardiola last season, with compatriot Fernandinho often preferred in a holding role in the Man City midfield.
“It’s been a pleasure to play for Manchester City,” Fernando told the official club site.
“The club has looked after me incredibly well throughout my time here and I have enjoyed the challenge of playing for a top team in probably the world’s toughest league. The League Cup success of 2016 was a highlight for me and something I will never forget.”
City director of football Txiki Begiristain added: “Fernando has been an excellent servant for City. He is a dedicated professional and a player who has made a significant contribution throughout his time here. I am sure he will continue to prove his quality for years to come.”