The invention relates to a diatomite-based hierarchical porous composite humidity-controlling material and a preparation method thereof, diatomite is used as a silicon source and a carrier, a partial alkali dissolution-hydrothermal forming method is adopted, the diatomite and sodium hydroxide are subjected to alkali dissolution for 10-40 min at the temperature of 50-80 DEG C according to the mass ratio of 1.5-3.5, and mixed ore pulp of sodium silicate and diatomite is prepared; and an oxalic acid solution with the mass fraction of 30%-60% and low corrosivity is added into the mixed ore pulp, acidification is carried out to generate white carbon black, crystalline aluminum chloride and sodium hydroxide are added according to the molar ratio of 1: 3-1: 1, aging is carried out for 30-150 minutes, uniformly stirring is carried out, a mixture is transferred into a reaction kettle, hydrothermal reaction is carried out for 6-12 hours at the temperature of 100-150 DEG C, and then filtering, washing and drying are carried out. The main components of the material are amorphous silicon dioxide and hydroxyl aluminum oxide; the nitrogen adsorption specific surface area is 110 m < 2 >/g, the pore volume is 0.15 cm < 3 >/g, and the average pore size is 10-40 nm; under the environment temperature of 10-30 DEG C and the relative humidity of 95% and 85%, the maximum moisture absorption capacities respectively reach 25% and 20% or above; and under the environment temperature of 10-30 DEG C and the relative humidity of 45% and 35%, the maximum moisture liberation amount reachesmore than 15% and 10%, which are improved by more than 3 times compared with the diatomite, so that the material has a good application prospect.