The present study explored the effect of ghrelin in protecting neurons from apoptosis in sepsis-associated encephalopathy. Ghrelin (100 nM) increased the cell viability treated with lipopolysaccharide (1.0 μg/ml, 24 h). The expression of p-Akt and Bcl-2 were decreased and caspase-3 increased both in lipopolysaccharide-treated primary hippocampal cultures and in the cecal ligation and perforation model, which were alleviated in the presence of ghrelin. In vitro, the protecting effect of ghrelin was almost abolished by the Akt inhibitor, SH-5. In vivo, the cecal ligation and perforation rats exhibited emotional, learning, and memory deficits. Administration of ghrelin attenuated the cognitive deficits significantly. These results indicate that ghrelin alleviates neuronal apoptosis and subsequent cognitive impairments in sepsis-associated encephalopathy through the Akt pathway.