PSG tried to recruit Gueye last January but Everton rejected their offer of 30 million euros.
"Paris St-Germain is thrilled to announce the signing of Idrissa Gueye," said a club statement on social media.
Gueye was one of the key players for Senegal during their run to the final of the 2019 Africa Cup of Nations in Egypt. He scored the only goal of the game in the 1-0 win over Benin in the quarter-final.
"I'm immensely proud to sign for Paris Saint-Germain," said Gueye on PSG's website.
"After focusing on the Africa Cup of Nations with Senegal, I wanted to give a new boost to my club career by joining Paris Saint-Germain, one of the most structured and ambitious sports projects in Europe.
"I can't wait to take in the amazing atmosphere of the Parc des Princes, which impressed me during my first seasons in France."
Gueye played at Lille between 2008 and 2015 before moving to England to join Aston Villa.