“Prophet Motive” is episode sixteen of season three of Star Trek: Deep Space Nine.
Grand Nagus Zek arrives on the station and makes himself at home in Quark’s quarters. When Quark – through his brother Rom – finally confronts the Nagus, he is informed that the latter has just completed a revised set of the Ferengi Rules of Acquisition.
Quark is excited to be the first to be allowed to read them – until he actually does. They have been profoundly changed, and are pretty much diametrically opposed to the existing ones, touting fair play, generosity and good works.
It also turns out that the Nagus has acquired one of the Bajoran Orbs of Prophecy that was taken by the Cardassians – which he is going to give, not sell, to the Bajorans. Quark believes that the Orb is connected to the changes in the Nagus, and believes he may have gone into the wormhole to confront the wormhole aliens, so Quark decides to take the Nagus back there, to see if he can be fixed.