In this work, nonequilibrium molecular dynamics simulations were performed to investigate the dispersion and spatial distribution of spherical nanoparticles (NPs) in polymer matrix under oscillatory shear flow. We systematically analyzed the influences of four important factors that consist of NP-polymer interfacial strength, volume fraction of NPs, shear conditions, and polymer chain length. The simulation results showed that the oscillatory shear can greatly improve the dispersion of NPs, especially for the polymer nanocomposites (PNCs) with high NP-polymer interfacial strength. Under specific shear conditions, the NPs can exhibit three different spatial distribution states with increasing the NP-polymer interfacial strength. Interestingly, at high interfacial strength, we observed that the NPs can be distributed on several layers in the polymer matrix, forming the PNCs with sandwich-like structures. Such well-ordered nanocomposites can exhibit a higher tensile strength than those with the NPs dispersed randomly. It may be expected that the information derived in present study provides a useful foundation for guiding the design and preparation of high-performance PNCs.