Wireless Sensor Networks (WSNs) are expressively utilized in various real-time control and monitoring applications. WSNs have been expanded considering the necessities in industrial time-bounded applications to support the dependable and time-bound delivery of data. Recently, Machine Learning (ML) algorithms have been used to address various WSN-related issues. The use of ML techniques supports dynamically modifying MAC settings based on traffic patterns and network conditions. In WSNs to control the communication between a large numbers of tiny, low-power sensor nodes while preserving energy and reducing latency, effective MAC protocols are essential. This paper addresses the ML centered priority-based self-organized MAC (ML-MAC) protocol to provide a priority-based transmission system to ensure the timely delivery of critical data packets. In this research, depending upon the predictions of the ML model, the MAC parameters are dynamically adjusted to find priority-based channel access and the optimal routing path to meet the deadline of critical data packets. From the result analysis, the average throughput and delay of the proposed ML-MAC algorithm outperforms the existing I-MAC protocol.