We have developed an on-line detection method using acridine orange as the fluorescence probe and applied this method to rapidly identify active compounds in herbal medicines. This on-line method was equipped with a high-performance liquid chromatography tandem diode array detector, electrospray ionization-ion-trap time-of-flight mass spectrometry and DNA- acridine orange fluorescence detection (HPLC-DAD-MSn-DNA-AO-FLD). A large amount of information could be simultaneously obtained during one run, which included HPLC fingerprint, ultraviolet spectra, total ion chromatograms, MSn data of high-resolution mass spectrometry and activity profile of each compound binding with DNA. The method also provided information on structureactivity relationships and mechanism of interaction. We used this on-line method to identify five DNA-binding activity components from Lithospermum erythrorhizon sample for the first time. The result showed that the parent nucleus of shikonin derivatives could bind with DNA. The structure-activity relationship showed that the parent nucleus of shikonin derivatives plays a major role in DNA binding, not the carboxyl group on the side chain. This simple, rapid, high precision and good stability on-line method should be useful for compound separation, structural identification and screening of DNA-binding compounds in herbal medicines.