The 18-year-old joins from FC Tokyo and will play for Madrid's B team, Castilla, next season, AFP reported.
"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 champion 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 had kept tabs on Kubo ever since but Madrid stole a march on its La Liga rival with an offer of €2 million ($2.25 million) a year, according to Japanese media.
Kubo came on as a second-half substitute in Japan's 2-0 win over El Salvador last weekend and has been included in the Blue Samurai squad for the Copa America, which began on Friday in Brazil.
He has scored four goals in 13 J-League games this year for Tokyo.
Japan opens its second Copa America campaign against Chile in Sao Paulo on Monday.