The normal aging process is accompanied by cognitive decline, and previous studies have indicated the crucial role of the hypothalamus in regulating both aging and cognition. However, the precise molecular mechanism underlying this relationship remains unclear. Therefore, this present study aimed to identify potential predictors of cognitive decline associated with aging specifically within the hypothalamus. To achieve this, we employed Morris water maze (MWM) testing to assess learning and memory differences between young and aged mice. Additionally, transcriptome sequencing was conducted on the hypothalamus of young and aged mice to identify potential genes. Subsequently, GO and KEGG analyses were performed to investigate the functions of differentially expressed genes (DEGs) and their associated biological pathways. Finally, the results obtained from sequencing analysis were further validated using qRT-PCR. Notably, MWM testing revealed a significant decrease in spatial learning and memory ability among aged mice. According to KEGG analysis, the DEGs primarily encompassed various biochemical signaling pathways related to immune system (e.g., C3; C4b; Ccl2; Ccl7; Cebpb; Clec7a; Col3a1; Cxcl10; Cxcl2; Fosb; Fosl1; Gbp5; H2-Ab1; Hspa1a; Hspa1b; Icam1; Il1b; Itga5; Itgax; Lilrb4a; Plaur; Ptprc; Serpine1; Tnfrsf10b; Tnfsf10), neurodegenerative disease (e.g., Atp2a1; Creb5; Fzd10; Hspa1a; Hspa1b; Il1b; Kcnj10; Nxf3; Slc6a3; Tubb6; Uba1y; Wnt9b), nervous system function (e.g., Chrna4; Chrna6; Creb5; Slc6a3),and aging (e.g., Creb5; Hspa1a; Hspa1b) among others. These identified genes may serve as potential predictors for cognitive function in elderly individuals and will provide a crucial foundation for further exploration into the underlying molecular mechanisms.