The isosteric replacement of C═C by B–N units in conjugated organic systems has recently attracted tremendous interest due to its desirable optical, electronic and sensory properties. Compared with BN-, NBN- and BNB-doped polycyclic aromatic hydrocarbons, NBN-embedded polymers are poised to expand the diversity and functionality of olefin polymers, but this new class of materials remain underexplored. Herein, a series of polymers with BNB-doped π-system as a pendant group were synthesized by reversible addition-fragmentation chain transfer (RAFT) polymerization from NBN-containing vinyl monomers, which was prepared via intermolecular dehydration reaction between boronic acid and diamine moieties in one pot. Poly{2-(4-Vinylphenyl)-2,3-dihydro-1H-naphtho[1,8-de][1,3,2]diazaborinine} (P1), poly{N-(4-(1H-naphtho[1,8-de][1,3,2]diazaborinin-2(3H)-yl)phenyl)acrylamide} (P2) and poly{N-(4-(1H-benzo[d][1,3,2]diazaborol-2(3H)-yl)phenyl)acrylamide} (P3) were successfully synthesized. Their structure, photophysical properties and application in metal ion detection were investigated. Three polymers exhibit obvious solvatochromic fluorescence. As fluorescent sensors for the detection of Fe3+ and Cr3+, P1 and P2 show excellent selectivity and sensitivity. The limit of detection (LOD) achieved by Fe3+ is 7.30 nM, and the LOD achieved by Cr3+ is 14.69 nM, which indicates the great potential of these NBN-embedded polymers as metal fluorescence sensors.