Particles with electric charge 10^(-12)e in bulk mass are not excluded by present experiments. In the present letter we provide a feasible scheme to measure the millicharged particles via the optical cavity coupled to a levitated microsphere. The results show that the optical probe spectrum of the micro-oscillator presents a distinct shift due to the existence of millicharged particles. Owing to the very narrow linewidth(10^(-7) Hz) of the optical Kerr effect, this shift will be more obvious, which makes the millicharges more easy to be detectable. We propose a method to eliminate the polarization force background via the homogeneously charged ring, which makes the scheme displays strong advantages in precision than the current experiments. The technique proposed here paves the way for new applications for probing dark matter and nonzero charged neutrino in the condensed matter.