The 18-year-old joins from FC Tokyo and will play for Madrid's B team, Castilla, next season. "Takefusa Kubo will join Castilla next season," a Real Madrid statement read.
"He is one of the most promising young players in world football, an attacking midfielder with excellent technique and great vision for the game.".
Kubo, who has been dubbed the "Japanese Messi", made his full international debut against El Salvador earlier this month and was also linked with Barcelona, Paris Saint-Germain and Premier League champions Manchester City.
Kubo earned his nickname after joining Barca's youth academy aged 10 but returned to Japan in 2015 as a result of FIFA sanctions handed to the club for breaching rules on signing under-age players.
Barcelona have kept tabs on Kubo ever since but Madrid stole a march on their La Liga rivals with an offer of two million euros a year, according to Japanese media.