The invention belongs to the field of antiviral drugs. The invention provides applications of Gramine and derivatives thereof to preparation of medicaments for resisting adenovirus Type 7. Gramine derivatives are compounds shown in G1,G2,G3,G4,G5,G10,G17,G18,G19,G20, and G21. Experiments for researching activity of Gramine derivatives for resisting ADV7, pharmacology research of Gramine derivatives for resisting ADV7, and tests of inhibition effects of G19 for ADV7 duplication show that Gramine derivatives can inhibit cytopathic effects (CPE) generated by ADV7 on host cell Hela, enhance cell survival rate, inhibit yield of progeny virus, and mainly inhibit the duplication phase of ADV7 virus in host cells. The Gramine and derivatives thereof have potential for preparing anti-ADV1 virus medicaments, and the compounds have the advantages of simple synthesis process, and economy and fastness; the compounds are easy for large-scale production, and have clinic application prospects.