The Spanish midfielder underwent a medical at United's Aon Training Complex earlier on Saturday.
"I am thrilled to be joining United," he told the club's official website. "I have enjoyed some very happy years at Chelsea but the time has come for a new challenge.
"United is the perfect place for me and I am excited at the chance I have to be part of the next phase in the club's history.
"Chelsea is a top club and I have many friends there but you cannot turn down the chance to join Manchester United. I look forward to helping the manager and the team be successful in the coming years."
United manager David Moyes has hailed the 25-year-old as one of the best players in the world and is confident that he will prove to be a success at Old Trafford.
"Juan is one of the finest playmakers in the game today and it's a real pleasure to have secured his signature," he said. "He's been instrumental in Chelsea's recent success, with a notable 28 assists and 32 goals in his last two Premier League seasons.
"I have been impressed with the excitement he has shown to be part of the new Manchester United.
"I know our fans have admired Juan for some time now – he has always played well against us – and I know they will be delighted to see him in the red of United, starting on Tuesday."
The length of Mata's contract has not been disclosed.