Argentina-born Di Stefano, who helped turn Real into one of the world's leading teams in the 1950s and is considered one of the finest footballers of all time, was taken to the intensive care unit of the Gregorio Maranon hospital over the weekend.
He had suffered an 18-minute respiratory arrest, the emergency services said on Saturday.
Real said Di Stefano died at the Gregorio Maranon at 1515 GMT on Monday.
The player known as 'La Saeta Rubia' (blond arrow) joined Real in 1953 and became a naturalised Spaniard three years later.
Di Stefano featured in attack when the club won five successive European Cups between 1956-60 and he scored in each of the finals.
He had health problems in recent years and was fitted with a pacemaker in 2005 after heart surgery.