Five-time Champions League winner Marcelo signed for Olympiakos with the Greek champions tweeting his arrival as "A true football LEGEND joins OLYMPIACOS!"
The 34-year-old Brazilian left back was a free agent after Real Madrid brought down the curtain on his 16 years at the club by releasing him at the end of last season.
The 58-times capped Marcelo is the most successful player in Real's history being part of teams that won 25 trophies but only managed five matches for them last term.
Marcelo began his career at Fluminense before moving to Real aged 18 and played for Brazil in both the 2014 and 2018 World Cup finals.
The Greek champions -- whose owner Evangelos Marinakis also owns Premier League side Nottingham Forest -- failed to make it into the Champions League group stage this term and will contest the Europa League instead.
They are in Group G and open their campaign against French side Nantes next Thursday.
© Agence France-Presse