Measuring the charge of a nanoparticle is of great importance in many fields including optics, astronomy, biochemistry, atmospheric science, environmental engineering, and dusty plasma. Here, we propose to use a high-Q whispering-gallery-mode (WGM) optical microresonator to detect the surface and bulk charge of a dielectric nanoparticle. Because of the modification of nanoparticle conductivity induced by the surplus electrons, both the coupling strength between the nanoparticle and the WGM and the dissipation changes compared with the case of a neutral nanoparticle. The charge density can be inferred from the transmission spectrum of the WGM microresonator. By monitoring the mode splitting, the linewidth broadening or the resonance dip value of the transmission spectrum, surface (bulk) electron density as low as 0.007 nm −2 (0.001 nm −3) can be detected for nanoparticles with negative (positive) electron affinity. The high sensitivity is attributed to the ultranarrow resonance linewidth and small mode volume of the microresonator.