The Congestion in wireless sensor networks can lead to the loss and retransmissions of packets, and excessive energy consumption. Since network congestion can deteriorate the throughput, the quality of service (QoS) in data transmission, and network lifetime, congestion control is a critical problem. In this paper, the data transmission process is firstly presented based on the data type. The cooperation game theory is used to model the transfer behavior of different type data. Further, a cooperation game based congestion control (CGCC) is proposed. The different type data cooperates with each other to use link capacity. And then Ant colony Routing algorithm combined with CGCC (ARCGCC) is designed. According to the congestion degree and QoS requirement of each type data, the routing path is built in the routing algorithm. When congestion is detected, the congestion information is exchange. In the light of the data traffic and priority, the nodes adjust the sending rate to the next hop node to mitigate the congestion. Experimental results show that our mechanism and algorithm have better performance than some other mechanism and algorithms in terms of the throughput, reliability, delay, and energy consumption.INDEX TERMS Wireless senor networks, congestion control, game theory, routing algorithm, QoS.