Protection schemes are essential in active distribution networks and microgrids’ reliable, efficient, and flexible operation. However, the protection of these networks presents significant challenges due to operational changes, such as variations in topology, distributed energy resources connection/disconnection, and microgrid operating modes, among others. This paper proposes an adaptive protection scheme based on overcurrent devices with several setting groups based on artificial intelligence algorithms. The developed strategy is composed of two stages. In the off-line stage, a clustering technique is employed to group the active distribution network operating scenarios exhibiting similarities. The optimal settings for the protection devices are determined for each set of scenarios. On the other hand, in the on-line stage, the protection strategy’s implementation and operation, considering the active distribution network’s existing communication system, are defined. Furthermore, the approach formulates the overcurrent relay coordination as a mixed-integer non-linear optimization problem, and as a result, the optimal setting of the overcurrent protection devices is obtained. It aims to minimize the operating time, considering the transformers’ thermal limits, fuse operating curves, and overcurrent relay settings. The solution is determined by using an Augmented Lagrangian genetic algorithm. The presented protection scheme is validated on the modified IEEE 34 node test feeder, considering the main operating scenarios of the active distribution networks, such as topology changes, distributed energy resource connection/disconnection, and microgrid operating modes (on-grid and off-grid). The results obtained and its easy implementation indicates the high potential for real-life applications.