The mechanism of electrochemical doping in poly(phenylenesulfidephenyleneamine) (PPSA) was investigated by in situ spectro-electrochemical methods. Our results indicate that the doping level in PPSA can be quantitatively adjusted by controlling the charge injection through regulating the applied oxidation potential and the duration of the doping. Due to the stabilization of the dopant ions, the oxidation state of the doped polymer can be permanently adjusted to desirable levels. It is demonstrated that a dry PPSA film with defined work-function (WF) values can be reproducibly prepared. The WF of the doped PPSA varies logarithmically with the amount of doping charge, in analogy with the changes in the Fermi level over impurity concentration observed in conventional semiconductors during doping.