A new sliding mode controller (SMC) design is proposed for a single-phase current source rectifier (CSR) integrated into onboard electric vehicle (EV) chargers. The controller's design aims to reduce the impact of varying grid impedance on the CSR's performance by using a disturbance estimator. The proposed method utilizes the Lagrange extrapolation technique for disturbance estimation, which accurately estimates disturbances caused by changes in the grid impedance. The precise state-space equation provided by the disturbance estimator is essential for designing the SMC, which can effectively handle mismatched disturbances. To mitigate the impact of the capacitor inductance filter's resonance frequency, a virtual parallel resistance with the capacitor is used, reducing the resonance amplitude. The proposed controller also controls the power factor to ensure the capacitor voltage and grid current are in phase. Simulation and experimental results demonstrate that the proposed method achieves stability and meets the harmonic content limitations of the IEC61000–3–2 standard. The total harmonic distortion (THD) is also kept below 5% despite changes in the grid impedance, demonstrating the effectiveness of the proposed method in handling varying grid conditions.