Mourinho makes Di Maria first Real signing
The 22-year-old, who has helped Argentina reach the quarter-finals of the World Cup in South Africa, is the first signing the club have made since Jose Mourinho replaced Manuel Pellegrini as coach last month.
The club did not release any figures but Spanish media reported the deal was worth around 25 million euros.
Di Maria is one of the biggest recent finds in Argentine soccer, having helped the under-20s win the 2007 World Youth Cup in Canada and also a gold medal at the Beijing Olympics in 2008.
He joined Benfica from Rosario in 2007 and took them win a league and cup double last season, when he was voted the competition's player of the year.
A pacy winger, who scores goals and lays them on for fellow attackers, he usually plays on the left flank but can also operate down the right and through the middle.