The invention discloses an application of an indolyl diketopiperazine compound in preparation of biological pesticides. According to the application, the discovered compound, i.e., 1,2,3,4-tetrahydro-2-methyl-3-methylene-1,4-dioxopyrazino[1,2-a]indole has a very high inhibiting effect on phytopathogens, i.e., Curvularia lunata, Colletotrichum gloeosporioides, Alternaria alternata and Cylindrocladium scoparium, so that the compound, i.e., 1,2,3,4-tetrahydro-2-methyl-3-methylene-1,4-dioxopyrazino[1,2-a]indole has a very good phytopathogen inhibiting effect and has a good application development prospect. Therefore, the invention provides candidate biopesticides for researching and developing novel antiphytopathogen pesticides and provides a scientific basis for developing and utilizing marine fungus derived natural active substances.