The invention discloses an aza eleven-membered ring compound, which has the following general structural formula: The invention also provides a method for preparing the compound. Under the condition of argon, using toluene as a solvent, first tris(diethylene benzylacetone) dipalladium-chloroform adduct and (4,5-bis(diphenylphosphine)-9,9-dimethylxanthene) phosphine ligand coordination, after stirring, the solution turns from red to After it turns yellow, add substrate 1 and substrate 2 to react, and the final product 3 is obtained after the reaction is completed. The invention also discloses the application of the compound and the medicine containing the compound. Its advantages are: the exploration of the compounds with the middle ring structure is further deepened, and it is found that the compounds with the middle ring structure also have pharmaceutical activity, and a preparation method capable of expanding production and large-scale production is provided. The reaction conditions of the method are easy to realize, the reaction time is shortened to the greatest extent, and high yield can be obtained at the same time.