The 28-year-old spent the 2011-12 season on loan at Madrid, where he helped the club to win the Europa League.
"I feel a great emotion at coming back to a team where I did fantastically well. I am very excited. I just think about getting to work to help the team keep winning," Diego told the club's official website.
"It was a matter of time before Atletico reached the level that they are at now. I already saw the potential of the team and the club when I was here the first time.
"I am very happy to be part of such a strong group and one of the form teams in Europe."
Diego has made 33 appearances for the Brazilian national side, scoring four goals.