In Wireless sensor network (WSN), sink nodes are bottleneck of network due to congestion. Congestion deteriorates the overall performance of the system. So congestion detection in a WSN is very vital issue in the present scenario. In this paper, artificial neural network based congestion detection algorithm is developed. The neural network based congestion detection system uses number of participants, buffer occupancy, and traffic rate as input parameters and gives the congestion level as output. A number of NS-2 and MATLAB simulation results show that the proposed scheme accurately detects the congestion level and represents the state of congestion in the WSN.