Abstract The aims of this work, to study the electronic and adsorption properties of the interaction hydrogen cyanide with the pristine and B, Ga, BGa-doped (8, 0) zigzag aluminum phosphide nanotube (AlPNTs) in the gas phase using density function theory. From optimized structures the geometrical, electrical, quantum descriptors such as global hardness, global softness, electrophilicity, gap energy, Fermi level energy, electronic chemical potential, electronegativity, natural bond orbital (NBO), NMR and molecular electrostatic potential (MEP) of all corresponded models are calculated. The results reveal that the B, Ga or BGa atoms doping can improve the adsorption abilities of a HCN gas on surface of AlPNTs. Inspection of the NBO results indicate that the doping B, Ga and BGa having higher polarizability than HCN gas, and thus the adsorption HCN gas alter significantly the electrical properties of AlPNTs from original state. It is noteworthy that the gap energies of all adsorption models are not affected to the HCN adsorption. According to MEP results, a low charge is transferred from the HCN gas to the nanotube ones resulting in a weak ionic bonding in the AlPNTs/HCN complex.