The invention discloses an infrared detector on the basis of an organic field-effect transistor and a method for preparing the infrared detector. The field-effect transistor sequentially comprises a substrate, a gate electrode, a dielectric layer, a semiconductor layer, a source electrode, a drain electrode and a packaging layer from bottom tot top. The dielectric layer is made from high-orientation silk fibroin biological materials, and the semiconductor layer is made from mixed materials with bamboo fibers and semiconductor materials. The infrared detector and the method have the advantagesthat high-orientation silk fibroin is utilized, leakage currents of the infrared detector can be effectively reduced, the dielectric properties of the dielectric layer can be effectively improved, accordingly, the detectivity can be effectively enhanced, and driving voltages of the infrared detector can be lowered; use of toxic reagents can be effectively completely eradicated by the aid of the bamboo fibers, the infrared response of the infrared detector can be enhanced owing to infrared light absorption properties of the bamboo fibers, and infrared rays can be detected by devices in a high-sensitivity and high-response manner; the infrared detector is made from the silk fibroin and the bamboo fibers and is low in cost and suitable for the field of flexible and wearable equipment and disposable bioelectronics, environments can be biologically protected, and the application range of the infrared detector can be broadened.