A highly efficient electrochemical sensor for the analysis of anticancer drug 5-fluorouracil (5-FU), is fabricated based on silver nanoparticles-polyaniline nanotube (AgNPs@PANINTs). AgNPs@PANINTs nanocomposite has been synthesized by a simple one-step method. Synthesized AgNPs@PANINTs nanocomposite was studied by Fourier transform infrared spectrometry, Scanning Electron Microscopy and Energy Dispersive X-ray. The fabricated PANINTs@AgNPs PGE was applied to the electrochemical sensing of 5-FU. Cyclic voltammetry and differential pulse voltammetry experiments illustrated high electro activity for the AgNPs@PANINTs nanocomposite. The study was explored using the Taguchi experimental design method. Electrochemical measurements using differential pulse voltammetry showed a wide linear relationship between 5-FU concentration and peak height within the range 1.0–300.0 μM with a low detection limit (0.06 μM). Also, the fabricated sensor showed excellent selectivity in the presence of two anticancer drugs and a number of other interfering compounds. The as-prepared sensor showed to be a promising device for a simple, rapid, and direct analysis of 5-FU.