The media access control (MAC) protocol in wireless sensor networks provides a periodic listen/sleep state for protection from overhearing and idle listening. However, many scenarios and applications exist in which sensor nodes must send data quickly to destination nodes. This paper proposes the priority-based quality-of-service MAC (PQMAC) protocol for wireless sensor networks. We use data priority levels to differentiate among data transmissions, and propose a MAC protocol based on these levels. This protocol manages scheduling by adaptively controlling network traffic and the priority level. We focused on reducing the latency of the message transmission from the source to the destination. Simulation results showed that PQMAC reduces latency problems in wireless sensor networks while maintaining energy efficiency.