A sensitive indirect competitive nanobody-based enzyme linked immunosorbent assay (Nb-ELISA) for ochratoxin A (OTA) with high resistance to cereal matrix interference was developed. Nanobodies against OTA (Nb15, Nb28, Nb32, Nb36) were expressed in E. coli cells and their thermal stabilities were compared with that of an OTA-specific monoclonal antibody 6H8. All nanobodies could still retain their antigen-binding activity after exposure to temperature 95°C for 5min or to 90°C for 75min. Nb28 that exhibited the highest sensitivity in ELISA was selected for further research. An indirect competitive ELISA based on Nb28 was developed for OTA, with an IC50 of 0.64ng/mL and a linear range (IC20-IC80) of 0.27-1.47ng/mL. Cereal samples were analyzed following a 2.5 fold dilution of sample extracts, showing the good resistance to matrix interference of the Nb-ELSIA. The recovery of spiked cereal samples (rice, oats, barley) ranged from 80% to 105% and the Nb-ELISA results of OTA content in naturally contamined samples were in good agreement with those determined by a commercial ELISA kit. The results indicated the reliablity of nanobody as a promising immunoassay reagent for detection of mycotoxins in food matrix and its potential in biosensor development.