Due to the serious issue of ofloxacin (OFL) abuse, there is an increasingly urgent need for accurate and rapid detection of OFL. Immunoassay has become the "golden method" for detecting OFL in complex matrix beneficial to its applicability for a large-scale screening, rapidity, and simplicity. However, traditional antibodies used in immunoassay present challenges such as time-consuming preparation, unstable sensitivity and specificity, and difficulty in directional evolution. In this paper, we successfully developed an OFL detection method based on a shark-derived single-domain antibody (ssdAb) to address these issues.