Rodri will officially join Diego Simeone's side on July 1, having made 47 appearances for Villarreal in the 2017-18 campaign.
The former Atletico youth talent plays as a holding midfielder and won the European Under-19 Championship with Spain in 2015.
Rodri is returning to his roots in the Spanish capital as a player being tipped to achieve big things.
Those he is leaving behind at Villarreal are, however, of the opinion that he is moving on "too soon".
Club president Fernando Roig told reporters in the wake of a deal first being announced: "He is leaving too soon.
"The player has already announced that he is leaving, with a sense of regret and sorrow that he is doing so, and I would have liked him stay with us for many more years but it wasn’t to be."
Roig added on dealings with Atletico: "We have come to the best arrangement possible for all three parties, with a club that talk a lot but don't back that up with their actions. But that’s the way life is and that’s the way football is, so we’ll accept the situation sportingly and that’s that."