Prolactin has multifaceted roles in lactation, growth, metabolism, osmoregulation, behavior, and the reproduction of animals. This study aimed to investigate the involvement of prolactin in testicular function in cashmere goats. Twenty cashmere goats were randomly assigned to either the control group (CON) or the bromocriptine treatment group (BCR, bromocriptine, prolactin inhibitor). Blood and testis samples collected for analysis after 30 days of treatment. The results indicated that, compared with the CON group, BCR significantly decreased (p < 0.05) the serum concentrations of prolactin, and significantly increased (p < 0.05) the levels of testosterone and luteinizing hormone (LH) on day 30. The serum level of the follicle-stimulating hormone (FSH) was not affected (p > 0.05) by the treatment. The mean seminiferous tubule diameter and spermatogenic epithelium thickness were increased (p < 0.05) in the BCR group. Subsequently, we performed RNA sequencing and bioinformatics analysis to identify the key genes and pathways associated with the regulation of spermatogenesis or testosterone secretion function. A total of 142 differentially expressed genes (DEGs) were identified (91 were upregulated, 51 were downregulated). Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) revealed that the DEGs were mainly involved in the extracellular matrix (ECM), hippo, and steroid hormone biosynthesis, which are related to testicular function. The expression of the genes SULT2B1, CYP3A24, and CYP3A74 in the steroid hormone biosynthesis pathway significantly increased (p < 0.05) in the BCR group, which was validated by qRT-PCR. These results provide a basis for understanding the mechanisms underlying the regulation of testicular function by prolactin in cashmere goats.