Al Rayyan have announced on their official website that they have reached an agreement to sign Nilmar from Villarreal.
The Brazil international will undergo a medical at the Qatari side on Tuesday, and is expected to ink a four-year deal upon successful completion of his physical tests.
Head coach Diego Aguirre's side beat the likes of Internacional and an unnamed Russian club to the signature of the highly-rated attacker. Nilmar, 28, will be Al Rayyan's third overseas player after Rodrigo Tabata and Cho Yong-Hyung.
The forward had been looking to leave Villarreal after the club's relegation to Spain's Segunda Division last season.
He previously wore the jerseys of Internacional, Olympique Lyonnais and Corinthians.