The Mexico forward passed his medical with Los Blancos on Tuesday and Real have the option to make the deal permanent at the end of the striker’s temporary spell in Spain.
United goalkeeper De Gea was clearly sad to see the 26-year-old head to the Bernabeu.
De Gea posted two pictures of the duo together on his official Twitter page and wrote: “A brother, a friend… @CH14_ (Hernandez) I’m gonna miss you! Thanks for help me since my first day.”
Hernandez, meanwhile, vowed to give his all to his new club after revealing his delight at securing the move.
“One knows what this club represents. I am delighted to be here,” said Hernandez.
“It really motivates you when you know that a big club has wanted you. The only thing on my mind is to help this club.
“I am here to give my contribution in order for the club to continue to win titles. I want to thank Real Madrid for giving me this opportunity.”
MORE: Man United latest news
MORE: Arsenal latest news
MORE: Chelsea latest news
MORE: Liverpool latest news