Numerous Internet of Things (IoT) devices adopt the IEEE 802.15.4 standard, which targets low data rate wireless networks. With the explosive growth in the use of IoT devices, it is essential to design effective and efficient channel access schemes for the 802.15.4 networks. In order to improve channel contention efficiency (CCE), which is defined as the number of times of successfully gaining the channel per unit of backoff time whereby throughput is improved, the scheme of enhancing channel contention efficiency (ECCE) has been proposed to jointly optimize the three key parameters of macMinBe, macMaxBe and macMaxCsmaBackoffs in the carrier sense multiple access with collision avoidance (CSMA-CA) mechanism in the 802.15.4 standard. A novel Markov chain was developed to model the CSMA-CA mechanism, which yielded the expected number of failures in gaining the channel, the expected number of backoff periods and the expected number of backoffs when a node intended to transmit a packet. These statistics resulted in CCE. An optimization problem that maximized the CCE with respect to the above-mentioned three key parameters was formulated. The solution to the optimization problem led to the optimal parameter values, which were applied in the ECCE scheme. The simulation results show that the proposed ECCE scheme outperformed the CSMA-CA mechanism in terms of CCE, delay and throughput.