Marine bivalves could accumulate paralytic shellfish toxins (PSTs) produced by toxic microalgae. These could impact physiological and cellular responses, being transmitted throughout the food chain and ultimately endangering human health. In the present study, we prepared chitosan derivatives as detoxification materials, performed infection and detoxification experiments of PSTs on scallops, and applied transcriptomics to elucidate the immune defense and detoxification mechanisms of scallops. The results showed that SMC was successfully synthesized, and compared with chitosan, the specific surface area decreased, the surface roughness increased, and the stacked granular structure was obvious. The adsorption rate of PSTs in aqueous solution was 54.42%, and the detoxification effect on the poisoned scallops was 55.29%; the detoxification effect on the kidneys was more significant. Transcriptomic data of scallops' hepatopancreas showed that the defense and detoxification phases induced 1805 and 1692 differential genes, respectively. Among them, cytochrome P450 and C1q complement-related genes were significantly differentially expressed in both defense and detoxification phases. The differential expression of immune-related genes, such as heat shock proteins (HSPs), GTPases of the immune-associated protein family (GIMAPs), and Toll-like receptors (TLRs), suggests that they may play an important role in the early stages of immune defense. Detoxification enzyme genes, such as multidrug resistance-associated protein (MRP) and glutathione sulfotransferase (GST), play a key role in later stages of detoxification. Here we first identified that detoxifying agents (SMC) in scallops can enter the hepatopancreas and kidneys, and observed a significant reduction in chitin synthase (CHS) expression, which confirmed the good detoxification effect of SMC on scallops. These findings help us to understand the molecular mechanism of scallop exposure response to PSTs.