As air pollution becomes more and more serious, the detection of harmful gas of NO has become an urgent need in daily life. In this paper, the electronic and gas-sensing properties of penta-BN2/penta-Graphene heterojunction (P-BN2/P-G) are studied by density functional theory and non-equilibrium Green's function method. The analysis results indicate that the P-BN2/P-G heterojunction has metallic properties. The electronic structures in combination with the adsorption behavior shows that the P-BN2/P-G heterojunction can chemically adsorb NO gas molecules, and there is obvious charge transfer, indicating that it has high gas sensitivity to NO gas. In addition, the sensing performance of the gas sensor constructed by NO adsorption on upper, middle and lower layers of the P-BN2/P-G heterojunction is deeply studied. Transport calculations show that when NO is adsorbed on the upper and middle layers of the P-BN2/P-G heterojunction-based gas sensor, the current of the device decreases significantly. When adsorbed on the lower layer, the current shows a trend of first decreasing and then increasing. Under a bias of 0.1 V, the gas sensitivity can reach up to 49% when NO is adsorbed in the middle layer, which is substantially higher than that of the P-BN2 monolayer device. It can be seen that the gas sensitivity is significantly improved after forming the heterojunction. In addition, the bias transport spectrum and scattering state can reveal the change in device current caused by the adsorption of NO gas molecules, thereby clarifying its microscopic mechanism. Finally, all the findings indicate that penta-based materials can be used as a very promising gas-sensitive material for detecting NO.