He also resigned after disagreements in parliament made the moderate Islamist party Ennahda, and lawmakers threatened to withdraw confidence in his government over alleged conflict of interest.
Mr Fakhfakh is alleged to have maintained shares in private companies that won state contracts amounting to $15m (£12m).
He, however, denied the accusations of corruption and had previously said he would step down if an ongoing investigation proved him guilty.
In a statement from the prime minister’s office, the resignation was said to be serving the national interests of the country and one that offers the president a new way out of the crisis.
The president is expected to appoint Mr Fakhfakh’s successor soon. The successor will have a maximum of two months to form a government that wins the confidence of lawmakers.