Cross-layer congestion control for wireless sensor network based on sliding mode variable structure is considered, for which node-congestion and link-congestion are occurred simultaneously. A discrete quasi-sliding mode control based on node-congestion and link-congestion is presented. Min-data package of node outgoing traffic is prioritized transmission in link-congetion. Cross-layer design of congestion control is significantly achieved. The algorithm can reduce queue time and alleviate congestion. Simulation results show that the algorithm can restrain the congestion in wireless sensor network, maintain high throughput and low delay time, and improve the quality of service for the whole network.