In order to reduce the sampling delay and improve bandwidth, sability margin, and the robustness of the active damping in LCL-filtered grid-connected inverters, real-time sampling provides a convenient method. However, aliasing is easily introduced in the control loop because of high-frequency switching harmonics, resulting in a rise in low-order harmonics. To address the challenge of aliasing under real-time sampling, a new method based on multisampling and mean filtering is proposed by combining the proposed harmonic detection and control methods in this paper. This method works by sampling and controlling the fundamental current and selective subharmonic currents separately. The fundamental current control loop without any additional filters maintains real-time sampling, while multisampling and mean filters are applied to the harmonic current control loop. The proposed control method can not only improve the dynamic response performance and control stability of the system but also effectively suppress the selective low-order current harmonics and the aliasing of sampling. Finally, the correctness of the proposed sampling scheme and control strategy is verified by the simulation based on R2018b, MathWorks, Natick, MA, USA and an experimental prototype of a three-phase grid-connected photovoltaic inverter rated at 230 V/50 Hz/40 kW.