Although Las Palmas may be relegated, Moleiro will not be part of the team that faces relegation and will instead join Villarreal, a club that competes in the Champions League qualifiers.
The decision to sign Moleiro comes as Villarreal is looking to replace Alex Baena, who is close to joining Atletico Madrid.
Despite playing in a central role for Las Palmas, Villarreal's coach Marcelino sees Moleiro as a suitable replacement for Baena on the left wing.
Previously, Moleiro turned down a lucrative offer to join a club in the Saudi Pro League in January to stay with Las Palmas for the remainder of the season.