Udder traits, influencing udder health and function, are positively correlated with lactation performance. Among them, breast texture influences heritability and impacts on the milk yield of cattle; however, there is a lack of systematic research on its underlying mechanism in dairy goats in particular. Here, we showed the structure of firm udders with developed connective tissue and smaller acini per lobule during lactation and confirmed that there were lower serum levels of estradiol (E2) and progesterone (PROG), and higher mammary expression of estrogen nuclear receptor (ER) α and progesterone receptor (PR), in dairy goats with firm udders. The results of transcriptome sequencing of the mammary gland revealed that the downstream pathway of PR, the receptor activator of nuclear factor-kappa B (NF-κB) ligand (RANKL) signal, participated in the formation of firm mammary glands. During the culture of goat mammary epithelial cells (GMECs), high RANKL level additions promote the Inhibitor kappaB (IκB)/p65/Cyclin D1 expression related to cell proliferation and decrease the phosphorylated signal transduction and transcription activator 5 (Stat5) expression related to milk-protein synthesis of GMECs, which is consistent with electron microscope results showing that there are fewer lactoprotein particles in the acinar cavity of a firm mammary. Furthermore, co-culturing with adipocyte-like cells for 7 d is beneficial for the acinar structure formation of GMECs, while there is a slightly negative effect of high RANKL level on it. In conclusion, the results of this study revealed the structure of firm udders structure and confirmed the serum hormone levels and their receptor expression in the mammary glands of dairy goats with firm udders. The underlying mechanism leading to firm udders and a decrease in milk yield were explored preliminarily, which provided an important foundation for the prevention and amelioration of firm udders and improving udder health and milk yield.