The Red Devils now have a deal in place for the Brazil international, with the finishing touches being put on a move to England.
United appeared set to face competition for his signature at one stage, with arch-rivals Manchester City among the other sides to have been linked with the highly rated 25-year-old.
Jose Mourinho had, however, been working on a transfer for some time and Shakhtar were happy to do business with their counterparts from Old Trafford.
Shakhtar’s CEO, Sergei Palkin, told the club’s official website on how an agreement came about: “We conducted the negotiations with the representatives of Man United for over two months.
“Since April, their scout had been constantly present at all our home games in Kharkiv.
“Jose Mourinho wanted to see Fred at Man United.
“The negotiations were interesting, and, as I said earlier, we are fully satisfied with the agreement terms.
“Fred has been at Shakhtar since 2013, he has grown seriously as a football player, deserving to continue his performance in a stronger league.
“I'm sure he will progress and improve his level. I wish him every success in the Premier League.
“It's nice that our former players - Willian, Fernandinho, [Henrikh] Mkhitaryan, and Fred – will be playing in England for the top clubs competing for the top spot.”
Fred is leaving the Ukraine side after five years and 156 appearances.
As pointed out by Palkin, he is set to become the latest former Shakhtar star to grace a Premier League stage.