The cyclization of 5-methoxy-1H-indole (I) with hexane-2,6-dione (II) by means of BF3 ethearate in refluxing dioxane gives 6-methoxy-1,4-dimethylcarbazole (III), which is formylated with N-methylformanilide (IV) and POCl3 in hot o-dichlorobenzene yielding the 3-formyl derivative (V). The condensation of (V) with 2-aminoacetaldehyde diethylacetal (VI) by heating at 100 C affords the expected imino derivative (VII), which is cyclized by acid (HCl) hydrolysis of the acetal group and cyclization of the resulting aldehyde by means of NaOH in water to the 9-methoxy-5,11-dimethyl-6H-pyrido[4,3-b]carbazole (VIII). The oxidation of (VIII) with m-chloroperbenzoic acid (MCPBA) in acetone gives the correponding N-oxide (IX), which is treated with BBr3 in dichloromethane yielding 9-hydroxy-5,11-dimethyl-6H-pyrido[4,3-b]carbazole (X). Finally, this compound is treated with 1-bromo-3-methoxy-2-propanone in DMF to afford the desired quaternary salt.