The invention relates to the preparation and the use of a dialdehyde-built disinsection activity-having nitrogen or oxygen-containing heterocyclic compound, and provides a compound with a chemical formula showed as formula (A), (B), (C) or (D), or an optical isomer, a cis-trans isomer, or an agriculturally pharmaceutically acceptable salt of the compound,. The invention further relates to an agricultural composite which comprises the compound, or the optical isomer the cis-trans isomer of the compound, or the agriculturally pharmaceutically acceptable salt, the use of the agricultural composite, and a preparation method of the compound, or the optical isomer, the cis-trans isomer of the compound, or the agriculturally pharmaceutically acceptable salt. The compound and ramification thereof has high disinsection activity for agriculture and forestry injurious pests such as aphid, plant hopper, leafhopper, thrips palmi karny, cotton bollworm, cabbage caterpillar, plutella xylostella, prodenia litura and armyworm, etc.