The invention discloses a fluorescent conjugated polymer containing a pyrrolopyrrolidone building unit, a preparation method and an application. Fluorescent conjugated polymers with pyrrolopyrrolidone structure as the main chain and different structures in the side chains were synthesized by Sonogashira coupling method. In the present invention, since pyrrolopyrrolidone is an electron-deficient system, intermolecular charge transfer can be formed with strong electron-donating anions, and the electron-donating abilities of different anions are different, which further affects the fluorescence of the conjugated polymer, thereby Responsive detection of anions is achieved. It is applied to the sensing and detection of common anions in tetrahydrofuran solution system, and has the effect of responsive detection. After testing, its pair of OH ‑ , F ‑ , Cl ‑ 、Br ‑ , I ‑ 、AcO ‑ It has a good response effect, and the color change of the polymer solution and the change of the fluorescent color can be observed with the naked eye, and the response detection to the anion can be realized conveniently.