Pablo Fornals has paid a €12m (£10.7m) release clause himself to leave Malaga and join Villarreal on a five-year deal.
"Pablo Fornals has executed the payment of the clause of termination that linked him to the club," Malaga said on their website after Fornals completed formalities to join his former team.
Malaga coach Michel Gonzalez was not happy about the transfer.
"Pablo leaves us, another one," he wrote on Twitter. "He said goodbye with his honesty and usual humanity: crying from sadness and not happiness. There must be a reason."
The 21-year-old has gained a reputation as one of the most promising young midfielders in the country and he is the latest to leave Malaga, who have already lost Sandro Ramirez, Ignacio Camacho and Carlos Kameni to Everton, Wolfsburg and Fenerbahce respectively.
Spanish international Fornals came through the Villarreal youth academy before leaving in 2008, heading first to Castellon and then Malaga in 2012.
The playmaker made his debut in September 2015 and impressed during the next two years, making 59 La Liga appearances and featuring in four Copa del Rey games, scoring a total of 10 goals.