The single-phase unified power quality conditioner (UPQC) is an advanced solution capable of compensating voltage sag/swell and current harmonics simultaneously in electrical systems, garnering considerable interest from experts. However, the compensation performance of UPQC can be adversely affected by the fluctuation of dc side capacitor voltage and the presence of nonlinear loads. In this article, we conduct a thorough analysis of the influence of dc voltage fluctuation and nonlinear loads on the series-parallel converter of UPQC. To mitigate these effects, a dynamic control strategy is proposed for the single-phase UPQC. For the series converter, a specific order harmonics compensation (SOHC) scheme is introduced in the outer-voltage loop to reduce grid voltage harmonics. In addition, a moving average calculation method is proposed for the parallel converter to determine the real-time average value of the subcapacitor voltage, effectively minimizing voltage errors in the proportional integral voltage equalization control. Finally, simulation and experimental results validate the efficacy of the proposed control method.