The microgrid includes a distribution system with low voltage, controllable load, and distributed energy resources (DER). The DERs have been increased in the recent power network to address global environmental concerns, which creates challenges in faults, synchronization, inertia control, etc. As the technologies are getting advanced day by day, the past technology becomes obsolete. The internet of things (IoT) and artificial intelligence (AI) are the most discussed topics to obtain solutions for the challenges. One of the proposed solutions is adaptive overcurrent protection, as it can be used for any grid. In this paper, an algorithm is developed for the adaptive overcurrent relay protection to overcome the challenges of the microgrid with distributed energy resources. Then, the solutions obtained from the adaptive overcurrent protection algorithm network simulation are compared to the traditional overcurrent protection algorithm using the four key points such as selectivity, reliability, sensitivity, and speed to have a good performance in the power network. All the simulation studies are done in the electrical transient analyzer program (ETAP) software environment. Simulation results validate the performance of the proposed algorithm for adaptive protection using the IEEE-9 bus system with a microgrid.