Condensation of 1,4-diacetyl-2,5-piperazinedione (I) with the equimolecular amount of benzaldehyde in the presence of triethylamine affords the benzylidene compound (II), which is N-methylated on treatment with iodomethane and sodium hydride to give III. Alkylation of the tetrahydroisoquinoline (V) with 4-(2-bromoethyl)nitrobenzene (IV) provides the tertiary amine (VI). The nitro group of (VI) is reduced by treatment with iron powder and concentrated HCl in refluxing MeOH to give aniline VII, which is condensed with 3-formylbenzoic acid (VIII) in the presence of 2-chloro-1-methylpyridinium iodide to afford the corresponding amide (IX). Finally, condensation between the previously obtained piperazinedione (III) and aldehyde (IX) in the presence of Cs2CO3 leads to the title compound.