Pharmaceutical and personal care products are emerging as a new category of environmental pollution. Analytical drug detection from a biological sample for detection is still crucial today. Mefenamic acid (MA) is an anti-inflammatory drug utilized for its antipyretic and analgesic properties, which is harmful to patients at higher dosages and is also recognized as a chemical pollutant that harms the environment. In this view, Dysprosium manganite/carbon nanofiber (DMO/CNF) was prepared by hydrothermal method for the electrochemical detection of MA. DMO/CNF/GCE exhibits high selectivity, excellent anti-interference, good stability, and reproducibility toward the detection of MA. The enhanced electrochemical performance of DMO/CNF/GCE was attributed to their synergetic interaction. Under optimized conditions, DMO/CNF/GCE shows a wide linear range of 0.01–741 μM and a low LOD of 0.009 μM. Satisfactory recoveries were obtained for human blood and tablet samples. Thus, the proposed DMO/CNF nanocomposite emerges as a promising material for the detection of MA.