Cephalosporin antibiotics are commonly used to treat mastitis in dairy cattle, but their overuse often results in excessive residues in milk, posing a significant food safety concern. Aptasensors provide a promising solution for the simultaneous detection of these residues. However, differences between screening conditions and real-world detection environments can affect aptamer performance. In this study, a broad-spectrum aptamer (Apt-93) with high affinity and specificity for cephalosporin antibiotics was successfully screened using a milk dilution-assisted graphene oxide (GO)-SELEX technique, achieving binding dissociation constants (Kd) of 27.21-43.45 nM. Leveraging Apt-93, we developed a DNA walker-based dual-mode aptasensor for detecting cephalosporin residues in milk. The sensor utilized streptavidin magnetic beads (SA-MBs) functionalized with hairpin chain-1 (H1) and a walking strand (aptamer hybridized with complementary DNA). Upon selective binding of cephalosporin antibiotics, the walking strand was released, triggering the opening of the H1 hairpin structure and exposing an enzymatic cleavage site. The enzymatic process cleaved carboxyfluorescein (FAM)-labeled H1, generating a fluorescent signal. Subsequently, the remaining H1 sequence bound to hairpin chain-2 (H2), releasing a G-rich sequence, which formed a G-quadruplex structure in the presence of hemin and K+, catalyzing a colorimetric reaction with 3,3',5,5'-tetramethylbenzidine (TMB). The dual-mode aptasensor achieved detection limits of 8.10 nM (fluorescence) and 20.3 nM (colorimetric). High recoveries in both pretreated and untreated milk samples demonstrated the robustness of the aptamer in terms of specificity and interference resistance. The dual-mode aptasensor offers a rapid and effective platform for detecting antibiotic residues, demonstrating a potential to enhance food safety monitoring.