A promising selective and sensitive biosensor was fabricated for the first time to monitor trace amounts of sorafenib (SORF), a multi-target kinase inhibitor, based on the electropolymerization of pyrrole on a carbon paste electrode (CPE). To prepare a modified CPE, the prepared metal organic framework (NH2-MIL-101(Fe)) was mixed with graphite powder in the presence of an appropriate amount of paraffin oil before it was packed into a plastic tube containing a copper wire. Computational studies appreciate the use of pyrrole as the functional monomer for electropolymerization at the CPE surface using chronopotentiometry in the presence of SORF as a template. After the leaching of SORF, the imprinted sensor was characterized using FT-IR, SEM, and AFM, while NH2-MIL-101(Fe) was investigated by XRD, XPS, and SEM analysis. Under optimum conditions, SORF was detected using anodic stripping differential pulse voltammetric and chronopotentiometric techniques. High sensitivity (6.40 × 10−12 mol/L), excellent selectivity, and a wide linear range (4.20 × 10−11–7.10 × 10−3 mol/L) were recorded. Furthermore, the proposed sensor exhibited good repeatability (RSD = 2.40 % for n = 7) and high lifetime stability (∼7 weeks). Based on the above-mentioned merits, the designed electrochemical sensor was properly utilized for SORF determination in different oncology patients with satisfactory results (recovery = 94.40–99.90 %).