Malaga had already signed Jeremy Toulalan, Ruud van Nistelrooy and Joaquin Sanchez this summer.
Cazorla developed into a key player for Villarreal after joining the club from Recreativo in 2006.
“They have been very enjoyable years but football carries on and I have a very exciting project ahead at Malaga and now I must focus on that,” Cazorla said in a farewell press conference at Villarreal’s training ground.