Abstract In this work, the donor‐acceptor (D−A) type conducting polymer with pendent nitrogen heterocycle (pyridine or pyrimidine) grafted polyterthiophene derivatives based electro‐chemical sensor for paracetamol (PAR) was proposed. The structure of polymer materials was characterized by Fourier transform infrared (FT‐IR), UV‐vis spectroscopy (UV‐vis), X‐ray diffraction (XRD), Energy dispersive spectroscopy (EDS), Scanning electron microscopy (SEM), Thermogravimetric (TG) analysis methods. The electrochemical performance of polymer modified electrodes was investigated by cyclic voltammetry (CV) and differential pulse voltammetry (DPV) methods. The effect of pendent nitrogen heterocycles on the structure and electrochemical performance of polymers were studied. The results showed that the non‐covalent interactions (hydrogen bonding and π‐π stacking) between the polymers and PAR could improve the electrochemical behavior. Compared with that of pyridine, the pyrimidine grafted polymer exhibited better electrochemical performance with a minimum detection concentration of 0.16 μM, a linear range of 0.16 μM–1300 μM, and a minimum detection limit of 0.06 μM.