The detection of explosives and drugs in large cargo distribution centers such as customs and logistics stations has a great effect on preventing smuggling crimes and terrorist incidents. However, the relatively thick shielding of container cargo makes the material composition information obtained by conventional detection methods such as X-ray transmission detection and imaging technology very limited. Nuclear Resonance Fluorescence (NRF) is an emerging nondestructive assay technology that uses the specific resonance energy of nuclides to identify unknown nuclides, which can be used to detect and analyze the isotopic composition of the inspected cargo. In this paper, according to the theoretical analysis of NRF, Geant4 is used to build the NRF backscatter detection model, the collimator structure of the electron accelerator and the background shield of the NRF signal are optimized and calculated, and the NRF process with 12C as the target element is simulated and calculated. The results show that the simulated characteristic energy spectrum of NRF signal is consistent with the theory, the designed background shielding scheme meets the needs of NRF signal identification and detection, and the simulated signal-to-noise ratio data provides the basis for the experiment.