City had been working to sign the 24-year-old throughout January; having initially been happy to bring him to the Etihad Stadium at the end of the season, they then stepped up their efforts midway through the month and attempted to recruit him before the winter transfer deadline.
The Blues were unable to break Shakhtar's resolve to keep the midfielder for the remainder of their Champions League campaign, but they have been in constant talks with the Ukrainians over the past week to put together an agreement which will come into effect this summer.
It is believed that all parties have agreed on the terms of the move, although nothing is officially signed.
Former Arsenal midfielder Gilberto Silva is one of Fred's representatives and has helped broker the move.
Goal first reported City's interest in Fred before Christmas , and it became apparent during the January transfer window that a deal worth roughly £40m was close to being agreed.
Sources have told Goal that Fred has been determined to join City ever since they first made their interest clear towards the end of 2017.
Midway through January, City decided to bring their summer transfer business forward and sign as many of their long-term targets as quickly as possible.
Having sealed a deal for Aymeric Laporte by paying his £57m buy-out clause, City also pushed ahead with moves for Fred and Leicester City's Riyad Mahrez.
The Blues failed to meet Leicester's demands for Mahrez and could not persuade Shakhtar to sell Fred, but they have continued negotiations for the latter and will bring him in this summer, barring any hiccups.
City agreed deals of this nature for Ilkay Gundogan and Laporte in 2016, and Bernardo Silva in 2017. Laporte pulled out of his move at the last moment, but Gundogan and Silva were announced in June and May respectively.
Additional reporting by Manchester City correspondent Sam Lee*