The invention discloses the application of Z, 3-hexenyl Z, 3-hexenoate as the liriomyza sativae attractant for the first time. The Z, 3-hexenyl Z, 3-hexenoate has an attractive effect on liriomyza sativae in the field, and the attractive effect is remarkable. Therefore, liriomyza sativae can be accurately lured and killed, the number of field populations is reduced, and the method is used for liriomyza sativae prevention and control, insect situation monitoring and the like. The insecticidal composition does not harm beneficial insects, human and livestock, crops and natural enemies, target pests do not generate resistance, and the insecticidal composition has the advantages of being natural, environmentally friendly and the like.