This study investigated the polymorphism of hypothalamic-pituitary axis genes and their effects on milk production traits. To this end, we used genomic information of 134 animals. The studied genes were prolactin (PRL), growth hormone (GH), pituitary transcription factor (Pit-1), and signal transducers and activators of transcription (STAT5a). Genomic DNA was isolated from semen, and the existing genotypes for all studied genes were identified using PCR-RFLP assay. The frequencies of the genotypes AA, AG, and GG of PRL-RsaI, LL, LV, and VV of GH-AluI, AA, AB, and BB of Pit1-HinfI, and TT, TC, and CC of STAT5a-AvaI were 0.754, 0.246, and 0, 0.873, 0.127, and 0, 0.142, 0.358, and 0.500, and 0, 0.261, and 0.739, respectively. The genotypes of PRL-RsaI, GH-AluI, and STAT5a-AvaI were in the Hardy–Weinberg equilibrium (P > 0.05), except for Pit1-HinfI (P < 0.05). The association of Pit1-HinfI and STAT5a-AvalI gene polymorphisms with milk fat yield (MFY) and milk protein yield (MPY) was significant (P < 0.05). However, no effective association (P < 0.05) was observed between genotypes and other studied traits. The results suggest that Pit1-HinfI and STAT5a-AvalI polymorphisms can be used as possible candidates in selecting some milk protein production traits, such as MFY and MPY.