Marcelo has agreed terms on a contract that will run until December 2024 with the option for another year.
The 34-year-old was a free agent after terminating his contract with Greek giants Olympiacos last week.
Marcelo only spent five months in Greece, making 10 appearances and scoring three goals for Olympiacos.
Marcelo left Real Madrid last summer as the club's most decorated player, winning 25 trophies, including five UEFA Champions League titles and six La Liga trophies.
The former Brazil international started his career with Fluminense's youth side before graduating to play 30 times for the senior time prior to his move to Real Madrid in 2007.
"The time has come to return," read Fluminense's statement on their Twitter account.
Upon returning to his boyhood club, Marcelo told club media: 'It's even difficult to express the meaning that this moment represents for me.
'I've been dreaming of returning to my origins for many years, to the team that trained me and taught me what I know about football.'
Marcelo won 58 caps for the Brazil national team.