The invention relates to an automatic humidity-testing, drying, mildew-preventing and insect-killing granary device and belongs to the technical field of grain storage. The automatic humidity-testing, drying, mildew-preventing and insect-killing granary device comprises a grain conveying plant, a storage battery, a granary body, a grain outlet, an insulation layer, an LED illuminating lamp, a dry ventilation fan, a solar panel, a temperature sensor, a humidity sensor, a grain insect entry, insect-killing porous sponge, an infrared detector, an insect-killing chamber, a signal line, an electric wire and a display system. Changes of an entire granary in temperature and humidity can be monitored in real time by the aid of the temperature sensor and the humidity sensor, drying measures such as drying by changing wind are carried out according to different temperatures and humidity, storage environment in the granary is kept cool, dry and well ventilated, pests in grain can be timely found out and killed timely, and loss of the grain can be greatly reduced.