The invention relates to a nitrogen-containing polyhydroxy arometic compound having a structure as shown in a general formula 1, wherein R1 is hydrogen, methyl or fluorine; R2 is hydrogen, methyl, acetyl, fluorine, chlorine or bromine; R3 is hydrogen, methyl, butyl, methoxyl, ethoxyl, fluorine, chlorine, bromine or nitro; R4 is hydrogen, methyl, acetyl, fluorine, chlorine or bromine; and n is 0 or 1. The invention also relates to a method for preparing the nitrogen-containing polyhydroxy arometic compound in the general formula 1. The compound has obvious inhibitory activity to HIV integrase, and is used for preparing anti-AIDS medicine. The n is equal to 0 or 1.