The invention relates to a compound for detecting secondary amine, and preparation and application thereof. The compound contains boron ester and a BODIPY structure unit in conjugate connection with the boron ester. The compound has a structural general formula shown as in (I), wherein R1 and R2 are independently selected from the group consisting of benzene, naphthalene, anthracene, pyrene, carbazole, triphenylamine, binaphthalene, thiophene, quinoline, imidazole and rhodamine. The preparation method has the advantages of simpleness, high yield, easy separation and high purity. The compound provided by the invention has a novel structure and rapid and sensitive detection of secondary amine; and when the compound reacts with secondary amine, the film turns into purple from red, and the fluorescence is quenched. The test paper and film prepared from the compound react with secondary amine, and significant changes of the color and fluorescence take place in a few minutes and are visible to the naked eyes, so as to conveniently identify secondary amine.