Foodborne pathogens such as Clostridium perfringens can cause diverse illnesses and seriously threaten to human health, yet far less attention has been given to detecting these pathogenic bacteria. Herein, two morphologies of nanoceria were synthesized via adjusting the concentration of NaOH, and CeO2 nanorod has been utilized as sensing material to achieve sensitive and selective detection of C. perfringens DNA sequence due to its strong adsorption ability towards DNA compared to nanoparticle. The DNA probe was tightly immobilized on CeO2/chitosan modified electrode surface via metal coordination, and the DNA surface density was 2.51 × 10−10 mol/cm2. Under optimal experimental conditions, the electrochemical impedance biosensor displays favorable selectivity toward target DNA in comparison with base-mismatched and non-complementary DNA. The dynamic linear range of the proposed biosensor for detecting oligonucleotide sequence of Clostridium perfringens was from 1.0 × 10−14 to 1.0 × 10−7 mol/L. The detection limit was 7.06 × 10−15 mol/L. In comparison, differential pulse voltammetry (DPV) method quantified the target DNA with a detection limit of 1.95 × 10−15 mol/L. Moreover, the DNA biosensor could detect C. perfringens extracted DNA in dairy products and provided a potential application in food quality control.