The invention discloses application of a Harmine derivative to preparation of antibacterial medicines. The bacteria is selected from Acinetobacter, Bacillus, Campylobacter, Chlamydia, Chlamydia trachomatis, Clostridium, Citrobacter, Escherichia, enterohemorrhagic escherichia coli, enteric bacteria, Enterococcus, Francisella, Haemophilus, helicobacter, Klebsiella Bacillus, Lester monocytogenes, Moraxella, Mycobacterium, Neisseria, proteus, Pseudomonas, Salmonella, shewanella oneidensis, Shigella, Stenotrophomonas, Staphylococcus, Streptococcus and Yersinia.