The invention relates to a method for controlling dichocrocis punctiferalis, which comprises the steps of getting the dichocrocis punctiferalis to be contacted with protein of CrylF. According to the method, the dichocrocis punctiferalis is controlled through the protein of CrylF which is capable of killing the dichocrocis punctiferalis and is generated in a plant. Compared with the prior art of agricultural control method, chemical control method and biological control method, the method can be used for protecting the whole plant from being damaged by the dichocrocis punctiferalis in the whole growth period, and the method has the advantages of being pollution-free, stable in effect, thorough in killing pests, simple, convenient and economic, and having no residue.