Following the penetration of microgrids in distribution systems, frequency deviations in contingency conditions are becoming increasingly important. Therefore, effective load shedding is necessary to regulate the frequency. This article develops a new load-shedding method for microgrids considering wind speed changes. The proposed method uses a combination of frequency and voltage data for determining load-shedding amounts in each contingency condition. For this purpose, the total required load shedding is determined first by using transient stability analysis in different contingency scenarios in microgrids. This will establish a database for an adaptive neuro-fuzzy inference system network to determine the total required load shedding. Then a fuzzy system is used to determine the load shedding in each step dynamically based on the severity of contingencies. The proposed method capability is compared with the conventional load-shedding method. Simulation results show the effectiveness of the proposed method for microgrid control in contingency conditions.