A major overhaul is expected at United over the coming months as new manager Erik ten Hag tries to put his stamp on the club after a hugely disappointing season.
United confirmed the departures of Paul Pogba and Jesse Lingard on Wednesday, while Nemanja Matic and Edinson Cavani will also exit the club this summer.
Mata made 285 appearances and won three trophies since joining from Chelsea in 2014 for £37 million ($46 million).
However, the 34-year-old former Spanish international has only played a peripheral role in recent seasons.
“Thank you for dedicating eight years of your career to United, Juan,” United said in a statement.
“Everyone at the club wishes you all the best for the future.”