The midfielder signed a six-year contract.
The two clubs had been in talks over a transfer for a number of weeks, with Real Sociedad insisting that Madrid met the 23-year-old’s buy-out clause.
Madrid confirmed on their website that the deal has been brokered and Illarramendi will sign a six-year deal with the Santiago Bernabeu side upon completion of his medical on Saturday.
“Real Madrid C. F. has hired Asier Illarramendi, who will now be with the club for the next six seasons. The player will be presented tomorrow – Saturday, July 13, at 13:00pm in the Royal Box at Santiago Bernabeu stadium, after undergoing the relevant medical examination.
Illarramendi is a product of the Sociedad youth academy and had developed into a key player at the Basque side since making his official first-team debut in June 2010.
The midfielder was an integral part of the Spain Under-21 squad that were crowned European champions in Israel this summer. He is seen as a long term replacement of Xabi Alonso.
Illarramendi becomes Real Madrid’s fourth signing of the summer transfer window after the previous capture of Casemiro, Isco, and Daniel Carvajal.