Ramos, 35, left Madrid after 16 years when his contract expired at the end of June.
Spain’s most-capped player won five La Liga titles and four Champions League medals with Real.
“I am very happy to join Paris St-Germain,” Ramos said. “This is a big change in my life, a new challenge and it’s a day I will never forget.”
PSG chairman and chief executive Nasser Al-Khelaifi said: “Paris welcomes one of the greatest players of our era.”
Ramos is PSG’s third signing of the summer, after the arrival of Morocco defender Achraf Hakimi from Inter Milan and Georginio Wijnaldum.
The Dutch midfielder also joined on a free transfer after leaving Liverpool.
Mauricio Pochettino’s side, who missed out on last season’s Ligue 1 title to Lille, have also been linked with a move for Italy international goalkeeper Gianluigi Donnarumma, who is a free agent after leaving AC Milan.
Ramos, who was left out of Spain’s Euro 2020 squad, will link up with former Madrid team-mates Angel di Maria and Keylor Navas.