The invention relates to flame retardants containing melamine structure as well as a preparation method and application thereof. The chemical structural formula of the flame retardants is shown in thedescription, wherein substituent groups R1, R2 and R3 are any one of hydrogen, tertiary butyl, normal-butyl, cyclohexyl alkyl or chlorine, bromine, methyl, methoxy, nitryl, amino, hydroxy-substitutedaryl or ceteroary. A synthesis method comprises the following steps: carrying out Ugi reaction on carboxylic acid compounds, the melamine, aldehyde compounds and isonitrile compounds in a mixed solvent of methanol and isopropanol at the temperature of 50 DEG C under the concerted catalysis of an MCM-41-loaded copper complex, MIL-101 and p-toluenesulfonic acid; carrying out filtering, extracting and column chromatography on a product to obtain the flame retardants containing the melamine. The invention discloses a novel preparation method with the advantages of simple reaction, few byproductsand better selectivity, which is used for selectively synthesizing the melamine flame retardants. The flame retardants disclosed by the invention have the advantages of good thermal stability, high flame retardancy rate, high purity reaching to 97.2 percent, easily-obtained raw materials, advanced technology and easiness for industrial production.