According to on embodiment, an inverter high voltage generator includes a DC power supply, an inverter, a high voltage converter, a discharge detector, a controller. The DC power supply generates a direct current. The inverter converts the direct current from the DC power supply to an alternating current by switching. The high voltage converter converts an AC output pulse from the inverter to a high voltage. The discharge detector detects an electric discharge that has occurred in an X-ray tube. The controller controls, upon detection of the discharge, switching of the inverter to change a pulse width or a frequency of the AC output pulse from the inverter so as to gradually increase a measured tube voltage value of the X-ray tube up to a target tube voltage value.