Financial details were not disclosed but media reports said PSG paid an initial fee off €21.5 million ($21.5m).
The 26-year-old has 15 caps for Spain since making his debut in 2019 and has even scored once on international duty. He had seven goals and five assists for Napoli in all competitions last season, helping them to a third-placed finish in Serie A.
Meanwhile, PSG coach Christophe Galtier has confirmed that midfielder Leandro Paredes has reached an agreement to join Juventus. While there is yet to be a deal reached between the clubs, Galtier said he was leaving Paredes out of the squad for Wednesday's trip to Toulouse.
"I spoke with Leandro after training. He has reached an agreement with Juventus, who we will shortly be playing against [in the Champions League] in September," Galtier said at a news conference.
"He is currently a PSG player but his head is elsewhere. There is still no agreement between the two clubs. I took the decision not to put him in the squad so that he could prepare his departure and I could not have a player who, perhaps, perhaps will leave the club."
"I can't tell you that it's completely over, the market is always exciting for everybody because there are always surprises until the last moment," he said.
"Obviously Milan has been a player that has been targeted for a long time, it seems difficult because the negotiations are very difficult with Inter Milan, but we must also respect the decision of Inter Milan, and as I said before there are more than 48 hours before the closing and everything is possible."
Ruiz is PSG's sixth signing since the close season after midfielders Vitinha and Renato Sanches, defenders Nuno Mendes and Nordi Mukiele, and forward Hugo Ekitike. PSG are top of Ligue 1 with 10 points and next play Toulouse on Wednesday.