The dispersion-corrected density functional theory (DFT-D3) is used to investigate the mechanism of mesoporous pulp waste (MPW) and polyaniline (PANI) adsorptive removal methyl orange (MO) dye from their aqueous solutions. The results are absolutely reliable because of the sufficiently accurate method although such big systems are studied. It is demonstrated that hydrogen bond and Van Der Waals interactions play a significant role in MO adsorption by MPW and PANI. For MO adsorption by MPW, hydrogen bond and Van Der Waals interactions are both weakened in S1 state. In contrast, hydrogen bond and Van Der Waals interactions between PANI and MO are both enhanced in S1 state. The thermodynamic parameters such as enthalpy and free energy change reveal that the MO adsorption by MPW and PANI are spontaneous and exothermic. The adsorption of MO on MPW is less favorable in S1 state and the adsorption of MO on PANI is more favorable in S1 state. Therefore, the photoexcitation should be controlled during the MO adsorption by MPW and applied for MO adsorption by PANI.