Kubo earned his nickname after joining Barca's youth academy aged 10 but returned to Japan in 2015 as a result of Federation Internationale de Football Association sanctions handed to the club for breaching rules on signing under-age players.
"Takefusa Kubo will join Castilla next season", a Real Madrid statement read.
Having celebrated his 18th birthday on June 4, the youngster will now head to Madrid where he will play for Los Blancos' Castilla reserve side.
"The top level of the madridista academy are set to get their hands on one of the most promising youngsters in world football".
Real Madrid described Kubo as "an attacking midfielder with excellent technique and great vision for the game".
According to Spanish media, Madrid will pay €2million to Japanese side FC Tokyo for the player.
Another J League record was broken five months later when he became the league's youngest ever scorer aged 15 years and 10 months.
He took part in training Thursday with Hajime Moriyasu's squad in San Paulo ahead of the 12-team tournament to be held between Friday and July 7, but left without speaking to reporters.
The FC Tokyo star, who is said to have attracted interest from Barcelona, Manchester City, Paris Saint-Germain and Los Blancos, recently came off the bench to make his national debut for Japan in their 2-0 victory over El Salvador on 9 June.
The club have already signed Belgian forward Eden Hazard from Chelsea, Serbian striker Luka Jovic from Eintracht Frankfurt and Porto defender Eder Militao.