The photocatalytic properties of semiconductor materials, which are controllable through the design of the bandgap structure, make them a promising catalyst for wastewater treatment. This work investigated the photocatalytic properties of single-walled aluminum phosphide nanotube (SWAlPNT) doped with different concentrations of boron (B) atoms for wastewater treatment. Analysis of the structural, electronic and optical properties of the SWAlPNT photocatalyst was performed using the density functional theory approach in terms of plane wave basis set and pseudopotential. The SWAlPNT was found to be stable to B doping with 3.6% and 7.1% concentrations. Cohesive energy decreases with an increase in concentration of dopant which results in efficient thermal stability. An indirect band gap value of 1.4 eV was obtained with B-doped SWAlPNT with 3.6% concentration which agreed with band gaps of other photocatalysts used for wastewater purification. Analysis using optical absorption spectra revealed that 3.6% B-doped system absorbs visible light while 7.1% doped system absorbs both visible and ultraviolet light. This study found both 3.6% and 7.1% B-doped SWAlPNT as suitable photocatalysts for wastewater treatment under solar irradiation, while the 3.6% B-doped system shows relatively better performance for wastewater treatment.