Renewable energy sources (RES) are crucial to the generation of electrical power, especially for grid-connected systems. When RES is integrated with a grid, power quality issues such as voltage sag, swell, and harmonics, affect the consumers. To overcome these issues, this paper presents the intelligent control algorithm-based Finite Control Set Model Predictive Control (FCS-MPC) strategy for an electrical grid-connected photovoltaic-wind hybrid energy system with DPFC (Distributed Power Flow Controller). For controlling FCS-MPC, Egret Swarm Optimization Algorithm (ESOA) algorithm is utilized to select the values required for the control operation. This work aims at mitigating PQ issues and compensating for power demand in HRES. This research proposes an ESOA-based FCS-MPC technique (ESOA FCS-MPC) with DPFC with real and reactive power to address PQ concerns in HRES systems. The proposed work is tested with the MATLAB/Simulink tool, and compared with the existing conventional PID controller, FOPID controller, and BWO-Based FOPID Controller based DPFC system. Based on simulation results, DPFC can improve the quality of the power and reduces the THD current and voltage value by 0.86 and 0.49%, respectively.