X-ray detection is a promising visualization method for internal defects' diagnosis within the power equipment, while its impact on partial discharge (PD) should be clarified due to the strong ionizing ability. In this work, the discharge dynamics under different X-ray irradiation doses in gas insulated switchgear (GIS) are numerically investigated by coupling the Monte Carlo N-Particle (MCNP) and 2-D particle-in-cell/Monte Carlo collision (PIC/MCC) model, taking into account the conversion from irradiation dose to preionization in space. It is observed that the increment in irradiation dose results in a faster propagating discharge with a significantly expanded volume, weakening the insulating performance of the gap against overvoltage. This is correlated with the insignificant difference in electron energy both in the channel and at the discharge front, which accelerates the synchronized development of electron avalanches and thus promotes diffuse discharge formation. The discrete seed electrons caused by X-ray irradiation can guide the discharge propagating path with a larger dose. The results in this work demonstrate the essential relationship between X-ray irradiation and discharge dynamics, providing a reference for X-ray detection applied in electrical equipment.