The invention discloses a method for preparing a solid-phase microextraction coating, which comprises the following steps: adding straw and biological enzymes to an aqueous ionic liquid solution, adding a mixed solution of acidic ionic liquid and DMSO after the reaction is completed, and heating to obtain a straw solution; Add graphite powder to the ionic liquid, ultrasonic pretreatment, add sulfuric acid and potassium permanganate, ultrasonic treatment again, introduce oxygen, centrifuge, wash and precipitate and dry to obtain graphene oxide, add it to the acidic ionic liquid, and then add 1‑methylimidazole, N‑picoline or pyrrolidone, heated to obtain graphene oxide derivatives; mixing and heating straw solution and graphene oxide derivatives to obtain sol solution; extracting fibers to form a rough surface, organic solvent After washing, ultrasonication and drying, it is immersed in a sol solution, then immersed in a polar solvent, and dried. The invention has the advantages of good biocompatibility, strong enrichment ability, stable extraction coating, long service life and the like.