We investigate mechanical, structural and electronic properties of CO2 adsorbed graphitic carbon nitride (g-C3N4) system under biaxial tensile strain via first-principles calculations. The results show that the stress of CO2 adsorbed g-C3N4 system increases and then decreases linearly with the increasing biaxial strain, reaching maximum at 0.12 strain. This is primarily caused by the plane N–C stretching of the g-C3N4. Furthermore, both the Perdew-Burke-Ernzerhof (PBE) and Heyd- Scuseria-Ernzerhof screened hybrid functional (HSE06) band gaps show direct-indirect transitions under biaxial tensile strain and have the maximum also at 0.12 strain. It is found that there is large dipole transition matrix element around Γ point, leading high optical absorption coefficients of the deformed adsorption system, which would be of great use for the applications of new elastic nanoelectronic and optoelectronic devices.