A measurement is reported for the response to charged particles of a liquid scintillator named EJ-335 doped with 0.5% gadolinium by weight. This liquid scintillator was used as the detection medium in a neutron detector. The measurement is based on the in-situ $alpha$-particles from the intrinsic Uranium and Thorium contamination in the scintillator. The $beta$-$alpha$ and the $alpha$-$alpha$ cascade decays from the U/Th decay chains were used to select $alpha$-particles. The contamination levels of U/Th were consequently measured to be $(5.54pm0.15)times 10^{-11}$ g/g, $(1.45pm0.01)times 10^{-10}$ g/g and $(1.07pm0.01)times 10^{-11}$ g/g for $^{232}$Th, $^{238}$U and $^{235}$U, respectively, assuming secular equilibrium. The stopping power of $alpha$-particles in the liquid scintillator was simulated by the TRIM software. Then the Birks constant, $kB$, of the scintillator for $alpha$-particles was determined to be $(7.28pm0.23)$ mg/(cm$^{2}cdot$MeV) by Birks formulation. The response for protons is also presented assuming the $kB$ constant is the same as for $alpha$-particles.