For the congestion problems in asynchronous transfer mode (ATM) networks, a controller based on reinforcement learning method is proposed, which does not need priori-knowledge. It improves its behavior policy through trial-and-error and the knowledge obtained by interaction with the environment. So this controller has the ability of self-learning, forces the queue length at the bottleneck node to the desired value asymptotically by adjusting the source traffic rate and guarantees the stability of the system. Some simulation results show the effectiveness of the method.