Abstract Identification of the volatile organic compounds released by insects can be used to detect insects in stored grains. An attempt was made to identify the volatile organic compounds released by Tribolium castaneum (red flour beetle) and Cryptolestes ferrugineus (rusty grain beetle) by headspace analysis. Feasibility of the automatic headspace sampler in headspace analysis was found to be positive. The amount of volatiles produced by T. castaneum adults increased with an increase in insect density. The concentration of methyl-1,4-benzoquinone; ethyl-1,4-benzoquinone; and 1-tridecene released by ten adult insects were: 8.5, 9.1 and 10.6 μg/100 μL compared to 7, 8 and 4.2 μg/100 μL for five adult insects. Extreme high or low temperature leading to death produced very high amounts of volatiles compared to insects kept at 35 °C. The larvae of the T. castaneum insects did not produce any volatiles at ambient condition or at extreme cold or hot condition. The C. ferrugineus adults did not produce any detectable amount of volatiles even at very high insect density after up to 3 days. The results of the combination of T. castaneum and C. ferrugineus insects gave the same volatile compounds as produced by T. castaneum insects alone.