Mata, 34, moved to United from Chelsea in January 2014 and made 285 appearances, winning the FA Cup, League Cup and Europa League during an eight-year spell. A skilful playmaker, he managed 51 goals and 47 assists for United.
"I feel so good. I am excited and very motivated. I'm grateful for being here. Everyone is being very friendly. I can't wait to win with Galatasaray," Mata said in a statement.
"Everyone told me what a nice atmosphere this place has. I'm waiting for the moment when I will experience this. I can't wait to fight in front of our fans. Galatasaray is the team with the greatest success in Turkey. It is also a club that has a place in the history of football. Thank you everyone for the warm welcome."