As the energy crisis becomes worse, hydrogen as a clean energy source is more and more widely used in industrial production and people’s daily life. However, there are hidden dangers in hydrogen storage and transportation, because of its flammable and explosive features. Gas detection is the key to solving this problem. High quality sensors with more practical and commercial value must be able to accurately detect target gases in the environment. Emerging porous metal-organic framework (MOF) materials can effectively improve the selectivity of sensors as a result of high surface area and coordinated pore structure. The application of MOFs for surface modification to improve the selectivity and sensitivity of metal oxides sensors to hydrogen has been widely investigated. However, the influence of MOF modified film thickness on the selectivity of hydrogen sensors is seldom studied. Moreover, the mechanism of the selectivity improvement of the sensors with MOF modified film is still unclear. In this paper, we prepared nano-sized ZnO particles by a homogeneous precipitation method. ZnO nanoparticle (NP) gas sensors were prepared by screen printing technology. Then a dense ZIF-8 film was grown on the surface of the gas sensor by hydrothermal synthesis. The morphology, the composition of the elements and the characters of the product were analyzed by X-ray diffraction analysis (XRD), transmission electron microscope (TEM), scanning electron microscope (SEM), energy dispersive spectrometer (EDS), Brunauer-Emmett-Teller (BET) and differential scanning calorimetry (DSC). It is found that the ZIF-8 film grown for 4 h cannot form a dense core-shell structure. The thickness of ZIF-8 reaches 130 nm at 20 h. Through the detection and analysis of hydrogen (1000 ppm), ethanol (100 ppm) and acetone (50 ppm) from 150 °C to 290 °C, it is found that the response of the ZnO@ZIF-8 sensors to hydrogen has been significantly improved, while the response to ethanol and acetone was decreased. By comparing the change of the response coefficient, when the thickness of ZIF-8 is 130 nm, the gas sensor has a significantly improved selectivity to hydrogen at 230 °C. The continuous increase of the thickness tends to inhibit selectivity. The mechanism of selectivity improvement of the sensors with different thickness of the ZIF-8 films is discussed.