Rooney, 31, played 559 times for the Red Devils, scoring 253 goals.
He won five Premier League titles and each of the Champions League, Europa League and FA Cup once after joining from the Toffees for £27m in 2004.
Rooney, who has signed a two-year deal, said he was “ecstatic” and his “first game back will be an emotional day”.
“It’s a great feeling to be back. I cannot wait to meet the lads, get on the training pitch and then get on the pitch to play,” he added.
Rooney’s return comes as United look set to sign Everton striker Romelu Lukaku, with a £75m deal for the Belgium international agreed between the two clubs.