Our work is devoted to theoretical study of the two-photon coherent spectroscopy of 7Li atoms continuously cooled in a magneto-optical trap (MOT) on the 2S–2P transition. The ultracold atoms are transferred to highly excited Rydberg states in a two-step coherent excitation process by red and UV lasers. The red laser is detuned by -600 MHz from 2S–2P transition frequency and UV laser frequency detuning is scanned in the vicinity of +600 MHz from 2P-nS(D) transition where n∼40-100 is principal quantum number. The fluorescence signal on the 2P–2S cooling transition makes it possible to obtain a two-photon absorption spectrum. Atom-field interaction is considered in the simple three-level approximation involving a density matrix formalism. It is shown that the effect of the MOT beams on the shape of the two-photon absorption line can be taken into account by an appropriate change in the 2S–nS(D) coherence decay rate.