This paper proposes a novel control scheme for unified power quality conditioner (UPQC) to minimize voltage sag, swell, and total harmonic distortion (THD) in a distribution grid integrated with distributed generation (DG). UPQC is a power electronics module that can provide, both, series and shunt compensation simultaneously in a distribution system. The whole characteristic of UPQC is dependent on the embedded control algorithms, which are used for generating a reference signal. This work focuses on synchrosqueezing wavelet transform (SWT) based identification, detection, and control of power quality (PQ) events. SWT is a time-frequency analysis method that analyzes multicomponent signals with oscillating modes. In this paper, first, SWT is used for the detection and identification of various kinds of PQ issues in the DG integrated grid. The SWT based identification scheme provides better resolution and increases the readability of time-frequency representation. This work further explores to control the PQ issues through UPQC's enhanced compensation capabilities which utilize artificial neural network (ANN) with SWT based shunt controller. The effectiveness of the proposed method is validated through MATLAB/ SIMULINK simulations and is seen that ANN with SWT based controller is better performed in comparison to ANN based controller,