Marin, a Spain U21 international, had made only six appearances for Napoli during their title-winning season last year. He initially moved to Napoli from Real Madrid a year ago for a fee of €12m.
As part of the deal, Villarreal will pay an initial loan fee of €1m for Marin's services. The 23-year-old defender will now play for Villarreal, also known as the Yellow Submarine.
This move is expected to give Marin more playing time and opportunities to develop his skills in the Spanish football league.