Designing a high-performance gas sensor to efficiently detect the hazardous NH3 molecule is beneficial to air monitoring and pollution control. In this work, the first-principles calculations were employed to investigate the adsorption structures, electronic characteristics, and gas sensing properties of the pristine and B-, N-, P-, Al-, and Si-doped penta-graphene (PG) toward the NH3, H2S, and SO2 molecules. The results indicate that the pristine PG is insensitive to those toxic gases due to the weak adsorption strength and long adsorption distance. Nevertheless, the doping of B, N, Al, and Si (B and Al) results in the transition of NH3 (H2S and SO2) adsorption from physisorption to chemisorption, which is primarily ascribed to the large charge transfer and strong orbital hybridizations between gas molecules and doping atoms. In addition, NH3 adsorption leads to the remarkable variation of electrical conductivity for the B-, N-, and Si-doped PG, and the adsorption strength of NH3 on the B-, N-, and Si-doped PG is larger than that of H2S and SO2. Moreover, the chemically adsorbed NH3 molecule on the N-, B-, and Si-doped PG can be effectively desorbed by injecting electrons into the systems. Those results shed light on the potential application of PG-based nanosheets as reusable gas sensors for NH3 detection.