Organic semiconductor (OSC) gas sensors with good mechanical flexibility have received considerable attention as commercial and wearable devices. However, due to poor resistance to moisture and low conductivity, the improvement in the sensing capability of individual OSCs is limited. Reported here is a promising pathway to construct a series of conjugated organic polymers (COPs) with well-defined pyrimidine (Py-COP) or boron β-diketone (BF-COP) units. Unlike traditional metal- or carbon-based hybrid materials, the developed COPs can provide abundant absorption sites for gaseous analytes. As a result, the as-prepared BF-COP results in an excellent sensing response of over 1500 (Ra/Rg) toward 40 ppm of NH3 at room temperature, which is the highest value among those of pristine COPs as n-type sensing materials. Notably, they can maintain their initial sensing responses for two months and 90% relative humidity resistance. Combining the results of in situ Fourier transform infrared spectroscopy and theoretical calculations, the β-diketone skeleton is found to activate the surface electronic environment, verifying that the electron-deficient B ← O groups are adsorption centers. The B/N-heterocyclic decoration effectively modulates the redox properties and electronic interactions, as well as perturbs charge transfer in typical π-conjugated COPs. These results offer insight into developing highly efficient OSC gas sensors, which potentially have broadened sensing applications in the areas of organoboron chemistry.