Ecdysone receptor (EcR) is a significant target in the identification of new environmentally friendly pesticides. There are two types of ecdysone agonists: steroidal ecdysone agonists and dibenzoylhydrazines (DBHs). In this study, various modeling methods (homology modeling, molecular docking, MD simulation, binding free energy calculation, and per-residue binding free energy decomposition) were utilized to study the different binding mechanisms of two types of ecdysone agonists. Our theoretical results indicated that the relative binding potencies of DBHs can be ranked sufficiently accurately using the MOE docking method. However, MM/PBSA calculations more accurately predicted the binding affinities between steroidal ecdysone agonists and EcR-LBD. To identify the key residues involved in ecdysone agonist binding, the binding free energy (ΔG ) was decomposed into the energy contributions of individual residues. The results revealed that nine residues-Ile339, Thr343, Met380, Met381, Tyr403, Tyr408, Asp419, Gln503, and Asn504-determined the binding affinities of the DBHs. Glu309, Met342, Arg383, Arg387, and Leu396 were important influences on the binding affinities of the steroidal ecdysone agonists. Graphical abstract The ecdysone receptor (EcR) is related to insect growth and has been shown to be a useful target for insecticides.