Peterotica is episode 24 of family guy season 04. It was originally aired on April 23, 2006.

After reading an erotic novel, Peter decides to write one of his own and gets Carter to publish it.  But when Carter gets sued for Peter’s book on tape, he loses all his money and is forced to become a middle-class citizen, much to his chagrin.