Currently, new nanomaterials for high-capacity lithium-ion batteries (LIBs) and sodium- ion batteries (SIBs) are urgently needed. Materials combining porous structure (such as representatives of metal–organic frameworks) and the ability to operate both with lithium and sodium (such as transition-metal dichalcogenides) are of particular interest. Our work reports the computational modelling of a new A’-MoS2 structure and its application in LIBs and SIBs. The A’-MoS2 monolayer was dynamically stable and exhibited semiconducting properties with an indirect band gap of 0.74 eV. A large surface area, together with the presence of pores resulted in a high capacity of the A’-MoS2 equal to ~391 mAg−1 at maximum filling for both Li and Na atoms. High adsorption energies and small values of diffusion barriers indicate that the A’-MoS2 is promising in the application of anode material in LIBs and SIBs.