The proposed integrated system combines of fuel cell (FC), photovoltaic (PV), battery, Z-source and Biogeography-Based Optimization (BBO) based Unified Power Quality Conditioner (UPQC) compensator aims to provide a high-quality power supply to sensitive loads, such as electrical, electronics, medical equipment, Electrical Vehicles (EV), or critical industrial processes. It can regulate voltage, mitigate power disturbances (e.g., voltage sags, swells, flicker, voltage interruption, harmonics, reactive power etc.), and ensure a stable power supply. Additionally, it can facilitate EV charging stations by managing the power flow and optimizing charging processes. The PV or FC based Z-source inverter can control and regulate power flow in both directions. It operates with a unique impedance network, allowing for voltage boosting or bucking. The Z-source inverter enhances the flexibility and control of power flow in the system. The fuel cell generates electricity through an electrochemical process, typically using hydrogen as a fuel source, while the PV array converts sunlight into electrical energy. The FC-PV system provides a renewable and clean energy source. The battery serves as an energy storage device within the integrated UPQC system. It stores excess energy produced by the FC-PV system or from the grid during off-peak hours and releases it when needed, contributing to load balancing and stability. Biogeography-Based Optimization (BBO)-based Selected Harmonic Elimination Pulse Width Modulation (SHE-PWM) technique calculate the proper inverter switching angles and control the total harmonic distortion (%THD). Grid connected EV charging station produce nonlinear current and pollute the DC-link system. The proposed FC-PV-Z source-BBO based UPQC and its control strategy can enhance the EV-charging induced PQ (power quality) issues, eliminate the voltage and current harmonic or reduce overall voltage and current %THD control the proper reactive power, improve the power factor, restoring the flicker, transient, swells and sags of the micro grid, grid or smart grid and completely moderate the fluctuations of DC-link voltage.