In this paper, we propose a MAC protocol that provides energy efficiency and QoS for wireless sensor networks. Because it does not classify the data according to the characteristics, traditional MAC protocols for Wireless Sensor Networks cannot provide service differentiations for different traffic classes. For the purpose of QoS support, the input data to the node is divided into priority classes according to the transmission emergency. Depending on the urgency of the data, the protocol can provide time slots for nodes and take different contention window sizes for different traffic classes. Nodes use the reinforcement learning-based control mechanism to actively infer the status of other nodes to classify effectively under various kinds of traffic conditions. The proposed protocol can meet the QoS requirements of delay-sensitive applications and can effectively deal with the problem of a multi-channel hidden terminal with the use of multi-queue. For the next purpose, the proposed protocol is energy efficient because it is based on sleep mode. To improve the energy efficiency, each node has a short non-overlapping listening interval, saving energy in idle listening intervals. This is one of the ways to efficiently use the energy of a node to extend the life of the entire network. This achieves low power consumption by increasing the throughput of data processed across the network and enabling efficient transmission. The classified data can be further improved by rearranging the data according to the nature of the transmitted data in the queue.