Two novel conjugated polymers (polymer 1 and polymer 2) containing trisheterocyclic systemsand carbazole as the copolymerization unit were synthesized by the Suzuki coupling reaction and characterized using NMR spectroscopy and other methods. 4'-(3,5-Dibromophenyl)-2,2':6',2''-terpyridine and 2,2'-(4-(3,5-dibromophenyl)pyridine-2,6-diyl)dithiazole were used as the recognizing units of the two polymers respectively. The polymers show blue-violet fluorescence when dissolved in THF. The ability of the polymers to identify anions and metal ions was investigated by fluorescence sensing tests. It was found that I- not only quenched the fluorescence but also undergone some redshift. Ni (II) efficiently quenched the fluorescence of the polymers, and polymer 2 recognized Ni2+ with higher specificity. UV-visible absorption titration experiments showed that Ni2+ formed complexes with the polymers. In addition, the formation of complexes between Ni2+ and polymers were used for the detection of amino acids, and it was found that lysine could regenerate the fluorescence of [polymer 1-Ni2+] and [polymer 2-Ni2+] with 99% fluorescence recovery.