A neutron detector requires selectively detecting neutrons not detecting gamma photons. However, since gamma photons are commonly emitted from a neutron source, the separation of neutrons and gamma photons is sometimes difficult. To solve this problem, we developed a phoswich imaging detector that can simultaneously but independently acquire images of neutrons and gamma photons. The developed neutron imaging system consists of a lithium-containing silver doped zinc sulfide (Li–ZnS(Ag)) plate stacked on a cerium doped yttrium aluminum perovskite (YAP(Ce)) plate to form a phoswich detector, which is optically coupled to a position sensitive photomultiplier tube (PSPMT). Neutrons are detected by the Li–ZnS(Ag) plate while gamma photons are detected by the YAP(Ce) plate. The scintillation light from the Li–ZnS(Ag) and YAP(Ce) plates is detected by the PSPMT, and the position of interaction is calculated. Pulse shape discrimination is used to separate the images of neutrons and gamma photons. The spatial resolution of the imaging detector for neutrons is ∼2.6 mm FWHM, and the sensitivity for 252Cf neutrons at 2 cm from the source enclosed in 2-cm-thick polystyrene plates is 5.2 cps/MBq. The spatial resolution of the imaging detector for gamma photons is also ∼2.6 mm FWHM, and the sensitivity for 60Co gamma photons at 2 cm from the source within 2-cm-thick polystyrene plates is 375 cps/MBq. The contamination by gamma photons in the neutron window was negligible. The developed phoswich imaging detector can simultaneously and independently acquire the images of neutrons and gamma photons, and thus it will impact the relevant research and applications of neutron detectors and imaging.