Accurate and rapid detection of antibiotics is critical for protecting human health and the environment. To this end, we report a novel electrochemical sensor for the simultaneous detection of Levofloxacin (LFX) and Tryptophan (TRP) in dairy samples. Outstanding electrocatalytic activity for the oxidation of LFX and TRP is exhibited by the Activated Nanodiamond (AND) and Ti3AlC2 max phase ( Ti3AlC2max) nanocomposite-modified glassy carbon electrode ( Ti3AlC2max AND/GCE) featured in our sensor. High selectivity and sensitivity are achieved by the sensor, with limits of detection (LOD) of 20.47 nM and 0.309 μM for LFX and TRP, respectively. Moreover, strong anti-parasite capacity is demonstrated by the developed sensor, making it an excellent candidate for the establishment of a reliable sensing platform for antibiotic detection. Findings suggest that this novel sensor could serve as a valuable tool for monitoring the content of LFX and TRP in dairy samples and enhancing the safety of these products.