The midfielder, 28, becomes United's third summer buy after £31m defender Victor Lindelof from Benfica and £75m striker Romelu Lukaku from Everton.
United manager Jose Mourinho described Matic as a "team player" who has "everything we want in a footballer; loyalty, consistency, ambition".
Matic said he was "delighted" to be joining at "an exciting time".
The Serbia midfielder added: "To work with Jose Mourinho once again was an opportunity I couldn't turn down.
"I have enjoyed my time at Chelsea and would like to thank the club and the fans for their support. I cannot wait to meet my new team-mates and to start training with them."
Former Chelsea manager Mourinho spent £21m to sign Matic from Benfica for a second spell at Stamford Bridge in January 2014.
He had been valued at less than £5m when he left as a makeweight in a deal for defender David Luiz in January 2011, two years after he first joined the Blues in a £1.5m move from Slovakian club MFK Kosice.
Matic scored once in 35 Premier League appearances during Chelsea's title-winning 2016-17 season, also striking spectacularly in their FA Cup semi-final victory over Tottenham in April.
His exit had been expected after the Blues signed France international Tiemoue Bakayoko, 22, from French champions Monaco in a reported £40m deal earlier in July.
Italian champions Juventus were also understood to be keen on Matic.
A new challenge needed?
In 2015, Matic was named in the PFA's Premier League team of the year, along with five other players from Chelsea's title-winning team.
According to Opta, he averaged nearly four tackles, made more than two interceptions and won eight duels - a 50-50 contest - per 90 minutes over the 2014-15 campaign.
However, last season Matic won only 278 duels, at an average of 4.77.
Last season, while Chelsea team-mate N'Golo Kante made an average of 3.64 tackles per 90 minutes - the fourth highest in the Premier League behind Liverpool's Jordan Henderson, Leicester's Wilfred Ndidi and Idrissa Gueye of Everton - Matic managed only 1.7.
The deal for Matic brings United's summer spending to £146m.
Almost £900m has been spent by Premier League sides so far in the summer transfer window, which closes on 31 August, and accountancy firm Deloitte predicts top-flight clubs will surpass the record £1.165bn they spent last summer.
Manchester City took their spending beyond the £200m mark by signing Monaco left-back Benjamin Mendy on Monday, while Chelsea have also spent more than £100m.