Two-dimensional materials, owing to their unique physical properties and high surface area, play a crucial role in intelligent sensing, particularly in the domain of atmospheric pollutant monitoring. In this work, we have extensively investigated the gas-sensing capabilities of the HfNBr monolayer for ammonia detection by introducing point defects, utilizing density functional theory and nonequilibrium Green's function calculations. Upon the introduction of point defects, the adsorption energy of HfNBr monolayers for ammonia significantly increased (from -0.162 to -1.257 eV), indicating a markedly strengthened affinity. To further elucidate the sensing mechanism, we conducted an in-depth investigation into the charge transfer dynamics, the density of states, and the charge density difference between the adsorbent and the adsorbate. Besides, we employed the NEGF method to evaluate the changes in the current-voltage characteristics of the HfNBr monolayer before and after adsorption, which revealed a remarkable change in the apparent resistance, thereby demonstrating excellent sensitivity. The exceptional performance of the HfNBr monolayer toward NH3 demonstrates its significant value in practical applications for ammonia detection.