This paper presents, models, and evaluates energy harvesting–aware distributed queuing (EH‐DQ), a novel medium access control protocol that combines distributed queuing with energy harvesting (EH) to address data collection applications in industrial scenarios using long‐range and low‐power wireless communication technologies. We model the medium access control protocol operation using a Markov chain and evaluate its ability to successfully transmit data without depleting the energy stored at the end devices. In particular, we compare the performance and energy consumption of EH‐DQ with that of time‐division multiple access (TDMA), which provides an upper limit in data delivery, and EH‐aware reservation dynamic frame slotted ALOHA, which is an improved variation of frame slotted ALOHA. To evaluate the performance of these protocols, we use 2 performance metrics: delivery ratio and time efficiency. Delivery ratio measures the ability to successfully transmit data without depleting the energy reserves, whereas time efficiency measures the amount of data that can be transmitted in a certain amount of time. Results show that EH‐DQ and TDMA perform close to the optimum in data delivery and outperform EH‐aware reservation dynamic frame slotted ALOHA in data delivery and time efficiency. Compared to TDMA, the time efficiency of EH‐DQ is insensitive to the amount of harvested energy, making it more suitable for energy‐constrained applications. Moreover, compared to TDMA, EH‐DQ does not require updated network information to maintain a collision‐free schedule, making it suitable for very dynamic networks.