The 27-year-old Argentina international joins the reigning Primera Division champions after one season at the Petrovsky Stadium, which followed a five-year stint at their Russian Premier League rivals Rubin Kazan.
Atletico sporting director Jose Luis Perez Caminero told the club’s website: "Ansaldi is a player who will help us to increase the competitiveness of the group.
"This is a side that can act in both attack and defence and the transfer makes us even more versatile. We are very pleased with this agreement."
Ansaldi began his career at Argentinian side Newell’s Old Boys in 2005, before moving to Rubin Kazan three years later.
He has been capped three times by Argentina, making his debut in a friendly against Spain in 2009.
The left-back is Diego Simeone’s eighth signing of the summer, and his arrival comes just four days after Los Rojiblancos welcomed France winger Antoine Griezmann to the Vicente Calderon Stadium.