The optoelectronic properties of the efficient hydrogen storage material Mg 0.915 A 0.085 H 2 (A = Ti, Fe), have been explored in detail using the most effective density functional theory calculations implemented by a Hubbard-like correction for localized strongly correlated electrons, coupled with a generalized gradient approximation (GGA) to the exchange correlation. The band structures and density of states calculation show that Mg 0.915 A 0.085 H 2 (A = Ti, Fe) compounds exhibit semiconductor behavior. The optical behaviors of the present hydrides were scrutinized from the complex dielectric function and discussed based on the electronic structure. Besides the real and imaginary contributions of the complex dielectric function, absorption and refractive index, reflectivity spectra, optical conductivity, and the energy loss function were analyzed. The hydrogen (H 2 ) storage capacity values are 2.4534 wt% and 2.7173 wt% for Mg 0.915 A 0.085 H 2 (A = Ti, Fe) compounds, respectively, and within a reasonable free energy of À0.22 eV and À0.17 eV as performed from quasi-harmonic approximation. The heat capacity and Debye temperature as a function of temperature for vibration analysis based on phonon calculations. MgH 2 when alloyed with Fe/Ti atoms provide excellent potential applications for hydrogen storage and optoelectronics.