The 30-year-old, who began his career in his homeland with Vila Nova, joined City from Porto for £12m in 2014.
Fernando made 101 appearances for City and helped them beat Liverpool in the 2016 EFL Cup final.
He played 27 games last season but made just one start, and remained at home during the team's pre-season tour of the US in July.
"It's been a pleasure to play for Manchester City," he said.
Pep Guardiola is looking to sign a centre-back after spending £200m this summer, with £120m of that on three full-backs.
Find all the latest football transfers on our dedicated page.
Brazilian midfielder Fernando has joined Turkish club Galatasaray from Manchester City for an undisclosed fee.