The variable switching frequency pulsewidth modulation (VSFPWM) is varying the carrier frequency of pulsewidth modulation (PWM) based on the prediction model to reduce the switching losses and lower the electromagnetic interference (EMI). However, it may cause some deterioration in digital dq current control of voltage source converters. This article takes the L -type grid-connected converter as the research object, and first presents the generation mechanism of the varying time delay caused by VSFPWM. In the case of proportional-integral current regulator implemented with VSFPWM, the varying time delay is accompanied by the frame rotation, which causes a varying phase lag in output voltages, degrading the system performance. Subsequently, an analytical method based on complex coefficient transfer functions is developed to provide an accurate explanation of the relation between the VSFPWM and the corresponding impacts. A compensation method is then proposed to eliminate the varying phase lag of output voltages when the VSFPWM is employed, improving the steady state and dynamic performance of dq current control. Finally, the simulation and experimental results are presented to verify the analysis and the effectiveness of the proposed compensation method.