We study in theory the generation and detection of electron spin coherence in nonlinear optical spectroscopy of semiconductor quantum dots doped with single electrons. In third-order differential transmission spectra, the inverse width of the ultra-narrow peak at degenerate pump and probe frequencies gives the spin relaxation time ($T_1$), and that of the Stoke and anti-Stoke spin resonances gives the effective spin dephasing time due to the inhomogeneous broadening ($T_2^*$). The spin dephasing time excluding the inhomogeneous broadening effect ($T_2$) is measured by the inverse width of ultra-narrow hole-burning resonances in fifth-order differential transmission spectra.