In an X-ray imaging device according to a first embodiment, an X-ray detector has a configuration in which scintillator elements are defined by light-shielding walls in a lattice shape. Among X-rays incident on the X-ray detector, X-rays incident on the light-shielding walls are not converted into scintillator light and are transmitted by the X-ray detector. Accordingly, by causing X-rays to be incident on the X-ray detector in which the scintillator elements are defined by the light-shielding walls in a lattice shape, an area in which X-rays 3a transmitted by a subject M are incident on the X-ray detector can be limited to an arbitrary range. Accordingly, since a detection mask can be omitted in the X-ray imaging device which is used for EI-XPCi, it is possible to reduce a manufacturing cost of the X-ray imaging device.