Green energy sources are implemented for the generation of power due to their substantial advantages. Wind generation is the best among renewable options for power generation. Generally, the wind system is directly connected with the power network for supplying power. In direct connection, there is an issue of managing power quality (PQ) concerns such as voltage sag, swells, flickers, harmonics, etc. In order to enhance the PQ in a power network with a wind energy conversion system (WECS), peripheral compensation is needed. In this paper, we highlight a novel control technique to improve the PQ in WECS by adopting an Artificial Neural Network (ANN)-based Distribution Static Compensator (DSTATCOM). In our proposed approach, an online learning-based ANN Back Propagation (BP) model is used to generate the gate pulses of the DSTATCOM, which mitigate the harmonics at the grid side. It is modelled using the MATLAB platform and the total harmonic distortion (THD) of the system is compared with and without DSTATCOM. The harmonics at the source side decreased to less than 5% and are within the IEEE limits. The results obtained reveal that the proposed online learning-based ANN-BP is superior in nature.