Atomic comagnetometers, which measure the spin precession frequencies of overlapped species simultaneously, are widely applied to search for exotic spin-dependent interactions. Here we propose and implement an all-optical single-species Cs atomic comagnetometer based on the optical free induction decay (FID) signal of Cs atoms in hyperfine levels $F_g=3~&~4$ within the same atomic ensemble. We experimentally show that systematic errors induced by magnetic field gradients and laser fields are highly suppressed in the comagnetometer, but those induced by asynchronous optical pumping and drift of residual magnetic field in the shield dominate the uncertainty of the comagnetometer. With this comagnetometer system, we set the constraint on the strength of spin-gravity coupling of the proton at a level of $10^{-18}$ eV, comparable to the most stringent one. With further optimization in magnetic field stabilization and spin polarization, the systematic errors can be effectively suppressed, and signal-to-noise ratio (SNR) can be improved, promising to set more stringent constraints on spin-gravity interactions.