To provide an X-ray tube capable of switching energy without changing the X-ray generating position, and to provide an X-ray inspection device using it.
A target 14 includes a first irradiated part being irradiated with a first characteristic X-ray by irradiating an electron beam 12, and a second irradiated part being irradiated with a second characteristic X-ray different from the first characteristic X-ray by irradiating an electron beam 12. An electron beam source 11 emits an electron beam 12, and is located so that the electron beam 12 thus emitted impinges on a predetermined position. A drive unit 16 displaces the target 14 so that a part of the target 14 irradiated with the electron beam 12 at the predetermined position is switched between the first and second irradiated parts.