The problems of the environmental pollution and the lack of energy carriers are propellant for the development and utilization of clean energies. Hydrogen as a clean energy for entering continuously in the energy market has a great challenge for storing, and an attractive hydrogen storage strategy is using modified carbon nanostructures. Here, the effect of the single N and S doping and N and S co-doping to graphdiyne (GDY) carbon structure on the structural and electronic properties (in presence and absence of the charge injection) was investigated, and H2 adsorption and storage capacity of the structures were considered. Results showed that Eads of the first H2 molecule on the pristine GDY, N-GDY, S-GDY, and N,S-GDY nanosheets are –0.093, –0.094, –0.224, and –0.493 eV, respectively. Then, the effect of the charge injection on H2 adsorption was examined. It was seen that Eads of the first H2 molecule on the neutral, +5 and –4e charged N,S-GDY is –0.493, –0.845, and –0.781 eV, respectively, and hydrogen storage capacities are about 4.84, 15.72, and 11.28 wt.%, respectively. These findings indicate the simultaneous usage of N,S-co-doping and charge injection can be effective in designing new H2 adsorbents.