In the present work, a comparative study of gas sensor performance of pristine polyaniline (PANI), PANI/ZnO nanowires, and PANI/Na-doped ZnO nanowires heterostructure to ammonia was carried out in room temperature. The PANI/Na-doped ZnO nanowires showed excellent gas-sensing performance against ammonia in comparison with the other samples. Moreover, the response and recovery time of the PANI/Na-doped ZnO nanowires were shorter than those of the other samples. Furthermore, PANI/ZnO nanowires ZnO nanowires performed good selectivity compared to the other samples, therefore it’s can be used as a biosensor. In fact, the protonation and deprotonation process of PANI/ZnO plays essential role in the enhancement of the gas sensing performance.