The early postnatal period is critical for the development of the nervous system. Stress during this period causes negative long-term effects, which are manifested at both behavioral and molecular levels. To simulate the elevated glucocorticoid levels characteristic of early-life stress, in our study we used the administration of dexamethasone, an agonist of glucocorticoid receptors, at decreasing doses at the first three days of life (0.5, 0.3, 0.1 mg/kg, s.c.). In adult male mice with neonatal dexamethasone treatment, an increase in the relative weight of the adrenal glands and a decrease in body weight were observed, while the basal level of corticosterone remained unchanged. Dexamethasone treatment in early life had a negative impact on the learning and spatial memory of adult mice in the Morris water maze. We analyzed the effect of elevated glucocorticoid levels in early life on the expression of the Crh, Avp, Gr, and Mr genes involved in the regulation of the HPA axis in the hypothalami of adult mice. The expression level of the mineralocorticoid receptor gene (Mr) was significantly downregulated, and the glucocorticoid receptor gene (Gr) showed a tendency towards decreased expression (p = 0.058) in male mice neonatally treated with dexamethasone, as compared with saline administration. The expression level of the Crh gene encoding corticotropin-releasing hormone was unchanged, while the expression of the vasopressin gene (Avp) was increased in response to neonatal administration of dexamethasone. The obtained results demonstrate a disruption of negative feedback regulation of the HPA axis, which involves glucocorticoid and mineralocorticoid receptors, at the level of the hypothalamus. Malfunction of the HPA axis as a result of activation of the glucocorticoid system in early life may cause the development of cognitive impairment in the adult mice.