An electrochemical immunosensor based on nanocomposite-modified glass carbon (GC) electrode has been developed. The biospecific surface was a CeO 2 -chitosan (CHIT)-modified nanocomposite to which anti-sulfamethoxazole (SMX) polyclonal antibody (Ab) was immobilized. The assay was based on competition of SMX and horseradish peroxidase (HRP)–SMX to the antibody immobilized. Electrochemical voltammetry and impedance spectroscopy studies revealed that the presence of CeO 2 -CHIT nanocomposite significantly enhanced conductivity of the electrode. The large electro-active surface area of nanoCeO 2 -CHIT/GC electrode resulted in the high loading of anti-SMX polyclonal antibody. The electrochemical signals of the immunosensor mainly resulted from the HRP catalyzed hydrogen peroxide reduction in the presence of thionine. The immunosensor showed high sensitivity for the detection of SMX. The electrochemical response signals of the immunosensor were found to be linearly proportional to SMX concentration in the range from 5×10 −7 to 5×10 −4 mgmL −1 with a regression coefficient of 0.9935 and a detection limit of 3.25×10 −7 mgmL −1 . No cross-reactivity of antibodies with other antibiotics of sulfonamide family was found. Under optimal conditions, the immunosensor was successfully applied to the electrochemical determination of SMX in milk, honey and egg samples, showing excellent stability and anti-interference ability.