Wireless Sensor Networks (WSNs) are an essential component in the Internet of Things (IoT)-based applications because they gather the sensed data from the IoT environment. WSNs consist of nodes that contain sensing units to detect required information. Each sensor has a limited amount of energy, but this energy is exhausted as transmission occurs. To reduce the transmission energy consumption between the sender and the receiver, a hybrid and multi-hop routing protocol known as Gateway-based Multi-hop Enhanced Stable Election Protocol (M-GESEP) for WSN-based IoT is proposed in this paper. The monitoring area is divided into regions in which the communication of sensor nodes with Base Station (BS) is hybrid ( i.e., some nodes communicate data directly while others use the clustering algorithm to send their data). The simulation result demonstrates that the proposed M-GESEP can improve the network lifetime by 45%, 35%, and 38% of the SEP, EDEEC, and ESEP protocols.