Marcelo will link up with the rest of the Madrid squad when the January transfer window opens.
Real Madrid have paid £4.5million to Fluminense for the talented defender.
He said: “For me it is a dream to have signed for Real Madrid at 18 years of age. I have played for another big team in Fluminense and I have to thank Real Madrid for following and then signing me at just 18.
“There was interest from other teams, but I wanted to go to Real Madrid. It’s a team that is 104 years old, with a great history, many titles and who is also playing in the Champions League. It’s a club that really impresses me.”