Reducing energy consumption for data transmissions and prolonging network lifetime are crucial in the design of energy-efficient routing protocols. The proportion of successful data transmissions is significant for the reduction of data transmission and traffic load energy consumption, although the energy remaining in node is important for prolonging network lifetime. In this study, the authors propose an energy-efficient cross-layer design for the network layer and medium access control (MAC) layer that reduces energy consumption and prolongs network lifetime. In the network layer, a minimum transmission energy consumption (MTEC) routing protocol is proposed for selecting the MTEC path for data transmission, based on the proportion of successful data transmissions, the number of channel events, the remaining node energy of nodes and the traffic load of nodes. The authors design an adaptive contention window (ACW) for the MAC layer that provides nodes with high successful transmission rates with greater opportunity for contending for a channel to save energy. They used simulations to compare the proposed cross-layer design (MTEC with ACW) with related protocols, including dynamic source routing, traffic-size aware and the Varaprasad routing protocol. The simulation results showed that the proposed cross-layer design (MTEC with ACW) provided better packet delivery rate and throughput than existing protocols. MTEC with ACW also exhibited lower-energy consumption during data transmission and a higher network lifetime than existing protocols.