In response to the growing demand for miniaturized、ultrafast pulsed X-ray sources in the fields of fundamental science and space applications, we have designed and developed an ultrafast pulsed X-ray generator based on a laser-modulated light source and a photoelectric cathode. This innovative technology addresses the limitations commonly encountered in traditional X-ray emission devices, such as low repetition rates, insufficient time stability, and suboptimal pulse characteristics. Our primary focus was on researching and developing the ultrafast modulation control module for the pulsed X-ray generator. This effort resulted in achieving high levels of time accuracy and stability in ultrafast time-varying photon signals. Moreover, we successfully generated nanosecond pulsed X-rays using a laser-controlled light source. On the theoretical front, we established a comprehensive time response model for the pulsed X-ray generator in response to short pulses. This included a thorough analysis of the time characteristics of the emitted pulsed X-rays in the time domain. In the experimental domain, we conducted a series of tests related to various time-related parameters of the laser-controlled light source. Additionally, we designed and implemented an experimental test system for assessing the time characteristics of pulsed X-rays, employing an ultrafast scintillation detector. The experimental results clearly demonstrate that our pulsed X-ray generator achieves impressive capabilities, including high repetition rates (12.5 MHz), ultrafast pulses (4 ns), and exceptional time stability (400 ps) in X-ray emissions. These results closely align with our established theoretical model. In comparison to traditional modulation techniques, our system exhibits significant improvements in pulse time parameters, greatly expanding its potential applications. This research is poised to provide valuable insights into achieving ultra-high time stability and ultrafast pulsed X-ray emission sources. These advancements will further enhance the capabilities of X-ray technology for scientific research and space applications.