"I have always said I'm happy to play for Paris Saint-Germain, and this contract extension is further proof of my commitment to the club," said Marquinhos, who joined PSG from Roma in 2013.
"Over the last four years, I have been able to gauge the progress made at Paris Saint-Germain, which has notably enabled me to get into the national team."
The 23-year-old has formed a solid centre-back partnership with compatriot Thiago Silva at the Parc des Princes, winning three French league titles in four seasons.
"Marquinhos' contract extension brings me great satisfaction," said PSG president Nasser Al-Khelaifi. "As well as being a fantastic player, Marquinhos is an extremely nice guy and always has a great attitude."
Uruguayan striker Edinson Cavani, the French league's top scorer last season with 35 goals, prolonged his PSG deal through to 2020 in April.
PSG finished second to Monaco in Ligue 1 last season, ending the club's run of four successive French championships.