The paper presents a method of modifying polyacrylonitrile (PAN) fibers using polyaniline (PANI). The PAN fibers were doped with polyaniline that was obtained in two different ways. The first consisted of doping a spinning solution with polyaniline that was synthesized in an aqueous solution (PAN/PANI blended), and the second involved the synthesis of polyaniline directly in the spinning solution (PAN/PANI in situ). The obtained fibers were characterized by the methods: X-ray powder diffraction (XRD), scanning electron microscope (SEM), fourier-transform infrared spectroscopy (FTIR), thermogravimetry (TG) and differential scanning calorimetry (DSC). Analysis of the results showed strong interactions between the nitrile groups of polyacrylonitrile and polyaniline in the PAN/PANI in situ fibers. The results of mechanical strength tests indicated that the performance of the PAN/PANI mixture significantly improved the mechanical parameters of polyaniline, although these fibers had a weaker strength than the unmodified PAN fibers. The fibers obtained as a result of the addition of PANI to PAN were dielectric, whereas the PANI-synthesized in situ were characterized by a mass-specific resistance of 5.47 kΩg/cm2.