Covalent-organic frameworks (COFs) have lately received extensive interest for their outstanding performance, especially to adsorption of hazards, while easy-preparation of uniform-sized COFs hold a great challenge. This research presented a simple synthesis method of flower-shaped COF (nanoflower) with strong hydrophobic surface at room temperature. Taking advantage of its easy-prepared and uniform-sized features, we proposed a versatile and efficient sample-pretreatment platform by employing the nanoflower COF for affinity adsorption of various hydrophobic biotoxins and further surface imprinting for selective enrichment of specific biotoxin (COF@MIP), respectively. The COF@MIP was integrating COF with molecular imprinting technique to achieve selective identification of sterigmatocystin (ST) with high specificity and sensitivity. They both exhibited well reusability, preserving 81% of initial activity after being used for six cycles. The as-prepared materials coupled with offline solid phase extraction (SPE) and high performance liquid chromatography (HPLC) were successfully applied to five common cereals with good recoveries in the range of 70.3–100.7%. Moreover, the principle of versatile sample pretreatment and detection platform based on the facile-prepared and uniform-sized COF nanoflower would be easily extended to other hazards. It provided a prospective approach for the pretreatment and determination of hazardous substances with low level in complex sample matrix.