The defender, who will join in the summer, is 21 years old and is a full global with Brazil.
Militao has signed a six-year deal at the Bernabeu, with Madrid confirming he has committed his future to the club until 2025.
Militao has had an excellent first season in Europe, becoming a key part of the Porto squad and starting 20 league and seven Champions League matches, scoring three goals in the process.
"Multi-purpose player, Militao plays central, although he has also occupied the right-back position".
Pi Day Pizza Specials in Charlotte
Cici's is offering an adult buffet for $3.14 with the purchase of another adult buffet and a large drink, with this coupon only. Pizza Luce Elsewhere on the cheesy side of pi, Pizza Luce will dish out $3.14 slices and select tap brews from open to close.
The player could yet the be the start of a summer splurge at Real after Zinedine Zidane's unexpected return to the club this week.
"These qualities have been on consistent display since his arrival at Porto last summer as he has adapted swiftly to the European game".
Militao was previously signed from Sao Paulo where he played in the 2017/18 season.
He is also a full Brazil worldwide and made his debut against El Salvador in September 2018.