A system for the endoscopic X-ray luminescence computed tomographic imaging is provided. The system comprises an excitation source unit (1) configured to excite a probe inside a detecting object from an external excitation source a signal collecting unit (2) configured to collect X-ray images of the detecting object and near-infrared light signal images emitting from the probe being excitated a computing unit (4) configured to preprocess the collected X-ray images and the near-infrared light signal images, execute sparse reconstruction on the preprocessed X-ray images so as to obtain anatomical structure information of the detecting object and location information of an endoscopic detector in the signal collecting unit (2) inside the detecting object, and use the obtained anatomical structure information and the location information to execute three-dimensional optical reconstruction based on the preprocessed near-infrared light signal images so as to obtain localization and distribution of an imaging target inside the detecting object.