The brain-specific isoform carnitine palmitoyltransferase 1C (CPT1C) has been implicated in the hypothalamic regulation of food intake and energy homeostasis. Nevertheless, its molecular function is not completely understood, and its role in other brain areas is unknown. We demonstrate that CPT1C is expressed in pyramidal neurons of the hippocampus and is located in the endoplasmic reticulum throughout the neuron, even inside dendritic spines. We used molecular, cellular, and behavioral approaches to determine CPT1C function. First, we analyzed the implication of CPT1C in ceramide metabolism. CPT1C overexpression in primary hippocampal cultured neurons increased ceramide levels, whereas in CPT1C-deficient neurons, ceramide levels were diminished. Correspondingly, CPT1C knock-out (KO) mice showed reduced ceramide levels in the hippocampus. At the cellular level, CPT1C deficiency altered dendritic spine morphology by increasing immature filopodia and reducing mature mushroom and stubby spines. Total protrusion density and spine head area in mature spines were unaffected. Treatment of cultured neurons with exogenous ceramide reverted the KO phenotype, as did ectopic overexpression of CPT1C, indicating that CPT1C regulation of spine maturation is mediated by ceramide. To study the repercussions of the KO phenotype on cognition, we performed the hippocampus-dependent Morris water maze test on mice. Results show that CPT1C deficiency strongly impairs spatial learning. All of these results demonstrate that CPT1C regulates the levels of ceramide in the endoplasmic reticulum of hippocampal neurons, and this is a relevant mechanism for the correct maturation of dendritic spines and for proper spatial learning.