Vehicular ad hoc networks (VANETs) employ multichannel to provide a variety of safety and non-safety applications. Safety applications require reliable and timely transmission, while non-safety applications need high network throughput. IEEE 802.11p and IEEE 1609.4 protocol divide the bandwidth into seven channels. One control channel (CCH) is to serve safety applications and the other six service channels (SCHs) to serve non-safety applications. The IEEE 1609.4 protocol specifies an alternating scheme to allow vehicles to switch between two types of applications. However, the IEEE 1609.4 multichannel media access control (MAC) protocol has limitations on its capability of supporting either delay- or throughput-sensitive applications. In this paper, we propose an adaptive multi-priority distributed multichannel (APDM) MAC protocol for VANETs. Considering that in realistic VANETs, the queue of MAC layer is far from saturated. We assume that generated packets with different priorities arrive at the MAC layer in a Poisson manner. A Markov analytical model is conducted to optimize the packet transmission probabilities and adjust the ratio between CCH interval and SCH interval dynamically according to the real-time traffic in a distributed way. An M/M/1 queue model is then adopted to analyze the time performance. Extensive simulation results show that the APDM MAC protocol can ensure prioritized transmission of safety packets, reduce the transmission delay of packets and enhance the unsaturated and saturated throughput of SCHs.