This research describes an intelligent Energy Management System (EMS) for a microgrid application that employs a Nonlinear Autoregressive Moving Average Level 2 (NARMA-L2) artificial neural network (ANN). The hybrid energy resources (PV/WIND), a hybrid energy storage system (HESS) with batteries and supercapacitors (SC), and loads are all integrated into the microgrid. Maximum Power Point Tracking (MPPT) in a photovoltaic (PV) system is based on the Nonlinear Autoregressive with exogenous inputs (NARX) approach. The flowchart, rules, memberships, and scenarios that allocate energy among various components based on battery State of Charge (SoC), PV/wind power, and load factors are described in the article. To validate the EMS's effectiveness, simulation tests under various conditions are presented. Supercapacitors (SCs) reduce DC bus voltage swings, lowering battery stress and extending battery life, it has been demonstrated using various load variations, as well as various sun irradiation and wind speed values under various conditions. The simulation results in the MATLAB/Simulink environment, validate the effectiveness of the proposed approach and produce effective DC BUS stabilizing and maintaining frequency stability of system that shows the importance and efficiency of the control strategy used.