Updated project metadata. Studies have shown the therapeutic effects of a ketogenic diet (KD) on epilepsy, but the effect of KD on drug reinstatement is largely unclear. This study aims to investigate whether KD consumption possesses therapeutic potential for cocaine reinstatement and the molecular mechanism. We find that KD significantly reduce cocaine induced-reinstatement in mice, which is accompanied by a markedly elevated level of β-hydroxybutyrate (β-OHB), the most abundant ketone body, in the hippocampus. The underlying mechanism is that β-OHB posttranslationally modify CaMKII-α with β-hydroxybutyrylation, resulting in significant inhibition of T286 autophosphorylation and downregulation of CaMKII activity. Collectively, our results reveal that β-hydroxybutyrylation is a posttranslational modification of CaMKII-α that plays a critical role in mediating the effect of KD consumption in reducing cocaine reinstatement.