Porto have announced that they have agreed to sell Fernando to Manchester City for 15 million euros.
City say the deal is not yet completed but it now looks certain that the 26-year-old will become the club's second summer signing after Bacary Sagna joined from Arsenal.
The Premier League champions originally made an offer for Fernando at the end of the January transfer window, only for the move to break down.
The Brazilian, who scored two goals in 142 games for Porto, will not require a work permit as he has Portuguese citizenship.
Porto announced the deal on Wednesday in a statement filed to the Securities and Exchange Commission.
"[The club] would like to inform that we have arrived at an agreement with Manchester City for the permanent transfer of the midfielder Fernando for 15 million euros," the statement read.
Fernando won the Primeira Liga four times, as well as the Europa League in 2011, during his seven years with Porto.
City were keen to sign another central midfielder to offer them an alternative to Yaya Toure and Fernandinho.
Although Javi Garcia made 33 appearances in all competitions last season, Jack Rodwell, who only started one league match, endured an injury-hit season and may now be made available.
Much like they did 12 months ago, City want to conduct most of their summer transfer business as soon as possible.
Sagna became their first close-season arrival when he joined from Arsenal on a free transfer, signing a three-year contract.
City manager Manuel Pellegrini is also eager to recruit a central defender -- with Fernando's Porto teammate Eliaquim Mangala his main target -- and a new reserve goalkeeper, after Costel Pantilimon was released before joining Sunderland.