The invention relates to a wave-absorbing material, in particular to a wave-absorbing material based on recycling of agricultural and forestry wastes and a preparation method thereof. According to thematerial, forestry and agricultural wastes (including walnut shells, shiny-leaved yellowhorn shells and the like) are taken as raw materials, a finished porous carbon wave-absorbing material can be obtained through four steps including crushing, sieving and early-stage washing preparation of the raw materials, ultrasonic activation pretreatment, staged heating carbonization treatment and freeze drying treatment, and the purpose of microwave absorption is achieved by utilizing the structural characteristics of the materials. The wave-absorbing material is good in wave-absorbing performance; the agricultural and forestry wastes are used as the raw materials, so traditional agricultural and forestry wastes are allowed to produce high value, wasting of biomass is reduced, and environmental pollution is avoided. The wave-absorbing material has the advantages of low material cost, no pollution in preparation and high product performance, accords with the concept of sustainable development,provides a scheme for resource utilization of the agricultural and forestry wastes, enriches the types of wave-absorbing materials, and provides technical support for promotion of the wave-absorbing materials.