Objective To investigate the effect of growth hormone secretagogue receptor 1a (GHS-R1a) knockout on the expression of microglial cells in the hypothalamus of mice. Methods A total of 12 male GHS-R1a-/- mice, aged 6 months, were selected as GHS-R1a-/- group, and 12 wild-type (WT) male mice of the same age were selected as WT group. The elevated plus maze (EPM) experiment was used to measure the level of anxiety in the two groups of mice, immunofluorescence assay was used to measure the number of microglial cells in the hypothalamus of the mice in the two groups, qRT-PCR was used to measure the gene expression levels of ionized calcium binding adaptor molecule 1 (Iba1), microglial activation protein CD68, and myeloid cell trigger receptor 2 (Trem2) in the hypothalamus of the mice in both groups. Results There was no significant difference in the results of the EPM test between the two groups (P>0.05). Immunofluorescence assay showed that compared with the WT group, the GHS-R1a-/- group had a significantly higher number of microglial cells in the hypothalamus (t=4.61,P<0.05). The results of qRT-PCR showed that compared with the WT group, the GHS-R1a-/- group had significantly higher mRNA expression levels of Iba1 and Trem2 (t=3.63, 3.01,P<0.05) and a significantly lower mRNA expression level of CD68 in the hypothalamus (t=3.79,P<0.05). Conclusion GHS-R1a knockout does not affect the level of anxiety in mice, but it can increase the number of microglial cells in the hypothalamus of mice. GHS-R1a may play a regulatory role in inhibiting the proliferation and phagocytosis of microglial cells and promoting the activation of microglial cells