For nonvolatile memory devices, the design and synthesis of their substrate materials are very important. Due to the versatility and large-area fabrication of the low-temperature spin coating process, organic/inorganic nanomaterials as active layers of memory devices have been deeply studied. Inorganic nanoparticles can engage in interactions with polymers via external voltage. WS 2 NPs have a large specific surface area and good conductivity. They can be used as the charge trap center in the active layer, which is conducive to the charge transfer in the active layer. Poly[2,7-9-(9-heptadecanyl)-9Hcarbazole-co-benzo [4,5] imidazole[2,1-α] isoindol-11-one] (PIIO) was synthesized via the Suzuki coupling reaction. ITO/PIIO/Al and ITO/PIIO:WS 2 NP/ Al devices were prepared by the spin coating method and vacuum evaporation technology. All devices showed tristable switching behavior. The influence of the WS 2 mass fraction on memory performance was studied. The device composite with 6 wt % WS 2 NPs showed the best storage features. The OFF/ON1/ON2 current ratio was 1: 1.11 × 10 1 : 2.03 × 10 4 , and the threshold voltage V th1 /V th2 was −0.60 V/−1.05 V. The device is steady for 12,000 s in three states−high-resistance state (HRS), intermediate state (IRS), and low-resistance state (LRS). After reading 3500 times, the switch-state current displayed no obvious attenuation. This work shows that the polymer and its composites have broad prospects in next-generation nonvolatile storage.