The invention discloses a method for preparing nitrogen doped graphene aerogel through the modification of a plant extract. The method comprises the following steps: taking 1 to 10 parts of a graphene oxide solution, 0.5 to 12 parts of a nitrogen source, and 1 to 30 parts of a plant extract in parts by volume, stirring, and performing ultrasonic dispersion, so as to obtain a mixed liquor; shifting the mixed liquor into a high pressure reaction vessel, and ensuring that the mixed liquor is reacted for 12 to 20h at 80 to 200 DEG, so as to obtain hydrogel; percooling the hydrogel for 1 to 12h at 0 to 20 DEG C after the hydrogel is dialysed, and taking out and naturally drying the hydrogel, so as to obtain the nitrogen doped graphene aerogel. The graphene aerogel prepared through the method has high nitrogen doping content, lays a foundation for the preparation of various nitrogen doped graphene-based function materials, and can be used for preparing various microswitches, micro sensors, supercapacitors, lithium batteries, solar batteries, refractory materials, catalytic materials, adsorption materials and oil absorption materials. The preparation method is simple in technology and convenient to operate, and can realize large-scale production.