Taken together, L-TAMS attenuated mechanical allodynia, depressive-like behavior, and memory deficits in CYP-induced cystitis model rats through prevention of magnesium deficiency and abnormal regulation of TNF-α/NF-κB signaling, IL-1β, and the NR2B subunit in the SDH and hippocampus. Here, GRIN2B is linked to magnesium deficiency.