Constructing Type-II heterostructure is an effective scheme to tailor the electronic structure and improve the application performance. Motivated by recently successful syntheses of Mg(OH)
2and GaS monolayers, we investigate the stability, electronic, and optical properties of GaS/Mg(OH)
2heterostructure by using the density functional theory method. The calculated results show that GaS/Mg(OH)
2heterostructure is easily constructed due to its small lattice mismatch, negative binding energy, and thermodynamic stability. Compared with monolayer materials, the GaS/Mg(OH)
2heterostructure has a band gap that effectively decreases to 2.021 eV and has Type-II band structure, facilitating the spatial separation of photo-generated carriers where electrons are localized in the GaS and holes reside in the Mg(OH)
2monolayers. The built-in electric field induced by the interlayer charge transfer points from GaS to Mg(OH)
2monolayer, which can further improve the separation and suppress the recombination of electron-hole pairs. Under the biaxial strain, the valance band maximum and conduction band minimum of GaS/Mg(OH)
2heterostructure shift in the downward direction to different extents, resulting in obvious change of band gap, with the change reaching about 0.5 eV. Furthermore, the band structure of GaS/Mg(OH)
2heterostructure can be transformed from indirect band gap semiconductor into direct band gap semiconductor under the tensile strain, while GaS/Mg(OH)
2heterostructure maintains Type-II band structure. Additionally, the band edge positions of GaS/Mg(OH)
2heterostructure can also be effectively adjusted to cross the redox potentials of water decomposition at pH = 0–7. The light absorption spectra show that GaS/Mg(OH)
2heterostructure has stronger light absorption capability than the constituent monolayers. Especially, the light absorption has an obvious redshift phenomenon at a tensile strain of 3%. These findings indicate that the GaS/Mg(OH)
2heterostructure has a wide range of applications in the field of optoelectronics due to the tunable electronic properties, and also provides some valuable insights for future research.