Carbon sponges are of great interest of the scientific community given their potential in advanced applications such as water cleaning, catalysis, energy storage, and mechanical reinforcement. These carbon nanomaterials improve their attributes for unexpected properties and applications by doping with foreign atoms. Nitrogen‑phosphorus-codoped and functionalized carbon nanotube sponges (NP-CNTSs) were synthesized, using the aerosol-assisted chemical vapor deposition (AACVD) method. We used acetonitrile and triphenylphosphine (TPP) as nitrogen and phosphorus precursors. According to our results, the NP-CNTSs were formed by entangled multi-walled carbon nanotubes (MWCNTs) of diameters ranging between 60 and 300 nm with Fe 2 P and Fe 3 C nanoparticles in the walls and inside the carbon nanotube sponges (CNTSs) respectively. The Fourier transform infrared (FTIR) characterization revealed the vibrational modes of aromatic and aliphatic C H, P O, P H, and O C N bonds. The NP-CNTSs undergo a quasi-reversible hydroquinone/quinone redox process as revealed by cyclic voltammetry studies. They also efficiently retain organic solvents, absorbing up to 40 times their weight for dichlorobenzene. The XPS and Raman characterizations show the presence of pyridinic nitrogen, which might be responsible for the formation of cavities in the wall of the CNTSs and the entanglement of carbon nanotubes, which promotes the growth of the NP-CNTSs. To study the role of nitrogen and phosphorus in the electronic properties of carbon materials, we carried out calculations proposed in the density functional theory (DFT) for phosphorus‑nitrogen codoping bilayer graphene and carbon nanotube junctions containing pentagonal, hexagonal, and heptagonal carbon rings. • Synthesis of carbon nanotubes sponges codoped with phosphorus and nitrogen. • FTIR revealed aromatic and aliphatic C H, P O, P H, and O C N bonds. • DFT-calculations of P-doped, N-doped, and NP-codoped in carbon nanostructures.