It’s one of the main goals of the heterogeneous wireless sensor network (HWSN) to extend the network lifecycle by reasonably utilizing the heterogeneity of node energy.Therefore, according to the heterogeneity of node energy, a routing protocol (SA-MGWO) for HWSN based on simulated annealing (SA) algorithm and modified grey wolf optimizer (GWO) was proposed.Firstly, the appropriate initial clusters were selected by de?ning different ?tness functions for heterogeneous energy nodes.Secondly, The ?tness values of nodes were calculated and treated as initial weights in the GWO.At the same time, the weights were updated dynamically according to the distance between the wolves and their prey and coefficient vectors to improve the GWO’s optimization ability.Finally, simulated annealing algorithm was used to ensure the selection of optimal cluster set in heterogeneous networks.Compared with stable election protocol (SEP), distribute energy efficient clustering (DEEC), modified stable election protocol (M-SEP), and fitness value based improved grey wolf optimizer (FIGWO) protocols, the experimental results indicate that the network lifecycle of the SA-MGWO protocol improves by 53.1%, 31.9%, 46.5% and 27.0% respectively.