Frequency stability, as one of the most important issues in the modern power grids, requires more efficient control methods due to the increasing complexity of the power system, high penetration of distributed generation sources as well as high electrical energy consumption. The challenges become more critical in the case of islanded microgrids (MGs), due to existing no traditional ancillary services of the upstream electric power network. Thus, the modern power grids, such as MGs, need advanced regulation methods to keep the generation-consumption balancing. Demand response (DR) is the recently introduced control approach which guarantees continuous contribution of controllable loads in the system frequency control. In this paper, a new online droop-based DR, generalized droop control (GDC), is introduced to apply in islanded MGs frequency control. An artificial neural network is used for online tuning of droop coefficients in the presented GDC framework. The proposed control approach changes controllable active and reactive loads, using a set of equations based on satisfying dynamics. To evaluate the effectiveness of the proposed control method, several scenarios are simulated in which changes of the system frequency and voltage are studied. Results show significant damping of power–frequency fluctuation and a desirable performance of the closed-loop system