Green wireless local area networks (WLANs) have captured the interests of academia and industry recently, because they save energy by scheduling an access point (AP) on/off according to traffic demands. However, it is very challenging to determine user association in a green WLAN while simultaneously considering several other factors, such as avoiding AP congestion and user migration constraints. Here, we study the energy-efficient user association with congestion avoidance and migration constraint (EACM). First, we formulate the EACM problem as an integer linear programming (ILP) model, to minimize APs' overall energy consumption within a time interval while satisfying the following constraints: traffic demand, AP utilization threshold, and maximum number of demand node (DN) migrations allowed. Then, we propose an efficient migration-constrained user reassociation algorithm, consisting of two steps. The first step removes AP-DN associations to eliminate AP congestion and turn off as many idle APs as possible. The second step reassociates these DNs according to an energy efficiency strategy. Finally, we perform simulation experiments that validate our algorithm's effectiveness and efficiency.