In wireless ad hoc networks, designing a backoff (BO) algorithm is crucial to avoid collision and to enhance the network throughput. The majority of current MAC protocols have altered the Binary Exponential Backoff (BEB) algorithm to provide relative priority among multiple traffic classes. But the BO interval should be adaptively altered depending on the residual energy and traffic load of contending nodes. Hence this paper designs a priority based optimized BO (PBOB) algorithm for collision avoidance. This algorithm works in standard IEEE 802.11 MAC protocol in which the contending nodes are prioritized based on their residual energy, load and traffic type. Then during contention period, the backoff interval is adaptively adjusted based on the priority of each contending node. By simulation results, it has been show that the PBOB algorithm has better packet delivery ratio and throughput with reduced energy consumption.