Ramos ended his 16-year stay in the Spanish capital after the 2020/2021 season when his contract expired.
Marcelo has been at Real Madrid since joining from Brazilian side Fluminense in the winter of 2007, making 528 appearances for Los Blancos.
The 33-year-old former Brazil international has won five La Liga titles, four Champions Leagues, two Copa del Reys, four FIFA Club World Cups among numerous other honours in his time at the club.
Marcelo told Madrid's official website of becoming skipper: "It’s an honour and an enormous responsibility to be captain of the greatest club in the world. I’m extremely lucky.
"When you are a Real Madrid player you wake up every day full of desire and that grows after every season. I’ve been here for a long time, but the desire is still there and it just keeps on growing. I’m really looking forward to the start of the new season.
"I learn a lot every season, there's always something new. I'm even more excited about this campaign because I'm Real Madrid captain. It's a dream come true for me and I believe I've done everything I can to be here for such a long time."
He added: "I've always tried to bring a little bit of my enthusiasm and taken responsibility to help the youngsters as well as those who've been here for a long time. Support is always welcome.
"I'm always looking to learn new things and I also need help from my team-mates. I believe that as captain I'm the spokesperson for the team and I'll always look to help as much as I can, just like I've always done."