Bacca shined for Milan last season, scoring 13 Serie A goals to stand out in an otherwise disappointing campaign for the club.
The Colombian, however, has been linked throughout the summer with a move away from San Siro, with Milan set for a year without European competition in 2017-18.
And, while Sevilla had been reported as interested in his signing, finally it is Villarreal who have clinched a loan deal for Bacca.
Bacca will move for an initial €2.5 million to Castellon, where he will play in La Liga for the coming season.
Villarreal will also have the option to purchase Bacca for €15.5m at the end of the year, although the clause is not obligatory.
The move marks a Liga comeback for Bacca, who represented Sevilla for two seasons before moving to Milan in 2015.
He scored a total of 34 goals in 77 appearances in all competitions for the Rossoneri, who this summer have reinforced their forward line with Porto's Andre Silva as well as clinching the signings of ex-Juve man Leonardo Bonucci and Argentine midfielder Lucas Biglia among others.