A phenyl [a] indole [2,3-g] quinazine compound of formula, or a enantiomer, diastereomer, racemate, and mixture thereof, a pharmaceutically acceptable salt, crystalline hydrate and solvate thereof, wherein R 1 and R 2 are each independently selected from the group consisting of hydrogen, deuterium, tritium, halogen, a substituted or unsubstituted C1-C6 alkyl, substituted or unsubstituted C1-C6 alkoxy, substituted or unsubstituted C6-C10 aryl, substituted or unsubstituted 5-7 membered heterocyclic ring, substituted or unsubstituted C1-C6 alkylphenyl, substituted or unsubstituted C1-C6 alkyl (5-7 membered heteroaryl), substituted or unsubstituted C3-C12 cycloalkyl, substituted or unsubstituted C2-C10 acyl, substituted or unsubstituted C2- C10 ester group, amino group, substituted or unsubstituted C1-C6 amide group, -SO 2 R 9, -OSO 2 R 9, -OCOR 9; and not both of R 1 and R 2 are hydrogen; R3, R 4 are each independently selected from the group consisting of hydrogen, deuterium, tritium, halogen, amine, hydroxy, a substituted or unsubstituted C1-C6 alkyl, substituted or unsubstituted C1-C6 alkoxy, substituted or unsubstituted C6-C10 aryl, substituted or unsubstituted 5-7 membered heterocyclic ring, substituted or unsubstituted C1-C6 alkylphenyl, substituted or unsubstituted C3-C12 cycloalkyl, substituted or unsubstituted C2-C10 acyl, substituted or unsubstituted C2-C10 ester group, amino, C1-C6 alkylamino, substituted or unsubstituted C1-C6 amide group, -SO 2 R 9, -OSO 2 R 9, -OCOR 9; R 5, R 6, R 7 and R 8 are each independently selected from the group consisting of hydrogen, deuterium, tritium, halogen, hydroxy, a substituted or unsubstituted C1-C6 alkyl, substituted or unsubstituted C1-C6 alkoxy, substituted or unsubstituted C3-C12 cycloalkyl, cyano, nitro, carboxyl, sulfydryl, -NR 9 R 10, -NCOR 9 R 10, -SO 2 R 9, -SO 2 NR 9 R 10, -OSO 2 R 9, or -OCOR 9; R 9 and R 10 are independently hydrogen, deuterium, tritium, halogen, an unsubstituted or 1-3 halogen substituted C1-C6 alkyl, or C3-C6 cycloalkane unsubstituted or substituted by 1-3 halogens, C6-C10 aryl unsubstituted or substituted by 1 to 3 halogens, C1-C3 alkyl-(C6-C10 aryl) unsubstituted or substituted by 1-3 halogens, 5-7 membered heteroaryl unsubstituted or substituted by 1-3 halogens; And when both of R 3 and R 4 are hydrogen, at least one of R 1, R 2, R 6, R 7 is a group selected from the group consisting of a substituted C6-C10 aryl, substituted 5-7-membered heterocyclic ring, -OSO 2 R 9; wherein the "substituted" refers to one or more hydrogen atoms on the group are substituted with a substituent selected from the group consisting of halogen, a C1-C6 alkyl unsubstituted or substituted by halogen or C3-C6 (preferably C1-C4) cycloalkyl, C1-C4 alkoxy, C3-C6 cycloalkyl, C1-C4 linear or branched alkyl substituted amine group, hydroxy, cyano, nitro, oxygen atom (=O), hydroxy-C1-C6 alkyl, carboxyl, sulfydryl, C6-C10 aryl unsubstituted or substituted by 1 to 3 halogens or hydroxy groups, unsubstituted or halogenated 5-7 membered heterocyclic ring, unsubstituted or halogenated C2-C6 acyl, C1-C6 hydroxyalkyl, -NR 9 R 10, -NCOR 9 R 10, -SO 2 R 9, -OSO 2 R 9, -SO 2 NR 9 R 10, -COOR 9 and -OCOR 9; n is 1. R3, R 4 are each independently selected from the group consisting of hydrogen, deuterium, tritium, halogen, amine, hydroxy, a substituted or unsubstituted C1-C6 alkyl, substituted or unsubstituted C1-C6 alkoxy, substituted or unsubstituted C6-C10 aryl, substituted or unsubstituted 5-7 membered heterocyclic ring, substituted or unsubstituted C1-C6 alkylphenyl, substituted or unsubstituted C3-C12 cycloalkyl, substituted or unsubstituted C2-C10 acyl, substituted or unsubstituted C2-C10 ester group, amino, C1-C6 alkylamino, substituted or unsubstituted C1-C6 amide group, -SO 2 R 9, -OSO 2 R 9, -OCOR 9; R 5, R 6, R 7 and R 8 are each independently selected from the group consisting of hydrogen, deuterium, tritium, halogen, hydroxy, a substituted or unsubstituted C1-C6 alkyl, substituted or unsubstituted C1-C6 alkoxy, substituted or unsubstituted C3-C12 cycloalkyl, cyano, nitro, carboxyl, sulfydryl, -NR 9 R 10, -NCOR 9 R 10, -SO 2 R 9, -SO 2 NR 9 R 10, -OSO 2 R 9, or -OCOR 9; R 9 and R 10 are independently hydrogen, deuterium, tritium, halogen, an unsubstituted or 1-3 halogen substituted C1-C6 alkyl, or C3-C6 cycloalkane unsubstituted or substituted by 1-3 halogens, C6-C10 aryl unsubstituted or substituted by 1 to 3 halogens, C1-C3 alkyl-(C6-C10 aryl) unsubstituted or substituted by 1-3 halogens, 5-7 membered heteroaryl unsubstituted or substituted by 1-3 halogens; And when both of R 3 and R 4 are hydrogen, at least one of R 1, R 2, R 6, R 7 is a group selected from the group consisting of a substituted C6-C10 aryl, substituted 5-7-membered heterocyclic ring, -OSO 2 R 9; wherein the "substituted" refers to one or more hydrogen atoms on the group are substituted with a substituent selected from the group consisting of halogen, a C1-C6 alkyl unsubstituted or substituted by halogen or C3-C6 (preferably C1-C4) cycloalkyl, C1-C4 alkoxy, C3-C6 cycloalkyl, C1-C4 linear or branched alkyl substituted amine group, hydroxy, cyano, nitro, oxygen atom (=O), hydroxy-C1-C6 alkyl, carboxyl, sulfydryl, C6-C10 aryl unsubstituted or substituted by 1 to 3 halogens or hydroxy groups, unsubstituted or halogenated 5-7 membered heterocyclic ring, unsubstituted or halogenated C2-C6 acyl, C1-C6 hydroxyalkyl, -NR 9 R 10, -NCOR 9 R 10, -SO 2 R 9, -OSO 2 R 9, -SO 2 NR 9 R 10, -COOR 9 and -OCOR 9; n is 1.