This thesis introduces the preparation of a series of Mg-based thin films with different structures using magnetron sputtering, as well as the systematical investigation of their gaseous and electrochemical hydrogen storage properties under mild conditions. It reviews promising applications of Mg-based thin films in smart windows, hydrogen sensors and Ni-MH batteries, while also providing significant insights into research conducted on Mg-based hydrogen storage materials, especially the Mg-based films. Moreover, the unique experimental procedures and methods (including electric resistance, optical transmittance and electrochemical methods) used in this thesis will serve as a valuable reference for researchers in the field of Mg-based hydrogen storage films.