a Representative images of AAV targeting to mouse DLS. b AAV-Mgll significantly increased the transcription of Mgll gene (unpaired two-tailed t test, t(22) = 2.889, P = 0.0085). Compared to AAV-eGFP group, **P < 0.01. c AAV-Mgll significantly increased the MAGL protein expression (unpaired t test, t(22) = 4.411, P = 0.0002). Compared to AAV-eGFP group, ***P < 0.001. d AAV-Mgll effectively reduced the 2-AG production and intra-DLS infusion of 2-AG obviously increased 2-AG level in AAV-Mgll-infected mice under hyperlocomotion paradigm (one-way ANOVA, followed by Tukey’s multiple comparisons test, F(5,40) = 18.77, P < 0.0001; AAV-eGFP + KET vs. AAV-eGFP + SAL, P = 0.0003; AAV-Mgll + KET vs. AAV-eGFP + KET, P = 0.0019; AAV-Mgll + KET + VEH vs. AAV-eGFP + KET + 2-AG, P = 0.0009). Compared to AAV-eGFP + SAL group, ***P < 0.001; compared to AAV-eGFP + KET group, ##P < 0.01; compared to AAV-Mgll + KET + VEH group, $$$P < 0.001. e Experimental time course for intra-DLS injection of AAV in ketamine hyperlocomotion test. f Intra-DLS injection of AAV-Mgll attenuated ketamine-evoked hyperlocomotion (n = 11 mice/group, two-way repeated measured ANOVA, followed by Dunnett’s multiple comparisons test, treatment, F(3,40) = 12.87, P < 0.0001; time, F(7,280) = 19.87, P < 0.0001; interaction, F(21,280) = 2.983, P < 0.0001). Compared to AAV-eGFP + SAL group, ***P < 0.001; compared to AAV-eGFP + KET group, #P < 0.05, ###P < 0.001. g Experimental time course for intra-DLS infusion of 2-AG in AAV-Mgll-infected mice under hyperlocomotion condition. h Intra-DLS infusion of 2-AG obviously restored the psychostimulant effect of ketamine in mice infected with AAV-Mgll (n = 11 mice/group, two-way repeated measured ANOVA, followed by Dunnett’s multiple comparisons test, treatment F(3,40) = 5.787, P = 0.0022; time F(7,280) = 14.77, P < 0.0001; interaction, F(21,280) = 2.189, P = 0.0023). Compared to AAV-Mgll + VEH + KET group, *P < 0.05, **P < 0.01, ***P < 0.001. i Experimental time course for intra-DLS injection of AAV and 2-AG in ketamine self-administration model. j, k Intra-DLS injection of AAV-Mgll reduced ketamine-seeking behaviors, but intra-DLS supplementation of 2-AG could not restore ketamine-induced behaviors in the AAV-Mgll-infected mice (n = 10 mice/group, two-way repeated measured ANOVA, followed by Tukey’s multiple comparisons test; active nose pokes, virus F(4,45) = 21.19, P < 0.0001; time F(9,405) = 0.8489, P = 0.5714; interaction, F(36,405) = 0.423, P = 0.9988; injections, Virus F(4,45) = 14.58, P < 0.0001; time F(9,405) = 0.6625, P = 0.7429; interaction, F(36,405) = 0.5889, P = 0.9731). Compared to AAV-eGFP + SAL group, **P < 0.01, ***P < 0.001; compared to AAV-eGFP + KET group, #P < 0.05, ##P < 0.01, ###P < 0.001. l Overexpression MAGL in the DLS decreased 2-AG level and intra-DLS injection of 2-AG restored 2-AG level in the AAV-Mgll-infected mice under ketamine self-administration paradigm (one-way ANOVA, followed by Tukey’s multiple comparisons test, F(4,40) = 13.27, P < 0.0001; AAV-eGFP + KET vs. AAV-eGFP + SAL, P = 0.0088; AAV-Mgll + KET vs. AAV-eGFP + KET, P = 0.0156; AAV-Mgll + KET vs. AAV-Mgll + KET + 2-AG, P = 0.0007). Compared to AAV-eGFP + SAL group, **P < 0.01; compared to AAV-eGFP + KET group, #P < 0.05; compared to AAV-Mgll + KET + VEH group, $$$P < 0.001. m Experimental time course for ketamine dose–response effect before and after intra-DLS infusion of 2-AG. n, o The baselines of self-administration and dose–response curves were counterbalanced between vehicle-infusion and 2-AG-infusion groups. n = 6 mice/group. p 2-AG increased the sensitivity to ketamine in self-administering mice (n = 6 mice/group, two-way repeated measured ANOVA, followed by Bonferroni’s multiple comparisons test, treatment, F(1,10) = 9.772, P = 0.0108; ketamine dose F(4,40) = 86.76, P < 0.0001; interaction, F(4,40) = 4.235, P = 0.006). Compared to KET + VEH group, *P < 0.05, ***P < 0.001. Data are shown as mean ± SEM. SAL saline, KET ketamine, VEH vehicle, Acc acclimation, aav infu AAV infusion, Rec recovery, Bas baseline test, FR1 fixed ratio1, FR3 fixed ratio3, FR5 fixed ratio5, DR dose response, L.A. test locomotor activity test, S.A. test self-administration test. One small circle represents for a day and one big circle for a week. Source data provided as a Source Data file.