Multilevel inverters are essential for increasing power quality, boosting efficiency, and lowering harmonic distortion in the field of power electronics. This research presents a new method using the Pelican optimization algorithm (POA) to create pulse patterns in multilevel inverters. The work focuses on deploying a 125-level asymmetric multi-level inverter that is powered by solar panels through a Dc-Dc converter in order to address power quality difficulties. In order to get better performance in multilevel inverter systems, the Pelican optimization algorithm is used to create pulse patterns that are modeled after the hunting strategies of pelicans. The Distributed Static Synchronous Compensator, is a leading device that uses power electronic components to control power flow and improve power quality in power grids. It is one of the many specialized power devices available. The primary objective is to enhance reactive power to ensure the stability of voltage within the power system and the aim of this research is to maintain voltage stability. Using the pelican optimization algorithm, the method entails creating and deploying a DSTATCOM based on a 125-level asymmetric multi-level inverter.