BackgroundMicroRNAs (miRNAs) are small endogenous non-coding RNAs that regulate gene expression by down-regulating it. Several studies have suggested that miRNAs plays a crucial role in mammalian skin color production. TheTYRP1gene, a member of the tyrosine family, is an important candidate gene that affects melanogenesis. This study aimed to identify genes and miRNAs that affect melanin production in Xiang pigs by transcriptome sequencing, and to validate their targeted regulatory relationships.Results17 miRNAs and 1,230 genes were significantly differentially expressed (P< 0.05) in the black and white skin tissues of Jianbai Xiang pigs. miRNA-221-3p was identified as a candidate miRNA for melanin formation and its target gene,TYRP1, was selected. TheTYRP1gene is a member of theTYRgene family, which evolved from theTYRgene through chromosome segmental duplication. The function of the gene was highly conserved throughout the evolutionary process. overexpression ofTYRP1gene significantly increased the expression ofTYR,TYRP1, andDCTgenesP< 0.01, which led to an increase in the relative content of melanin. Silencing ofTYRP1through the use of TYRP1-siRNA significantly reduced the expression ofTYR,TYRP1, andDCTgenes in Jianbai Xiang pig melanocytesP< 0.01, which in turn decreased the relative melanin content. The targeted binding relationship between ssc-miR-221-3p andTYRP1gene was validated. After transfection of porcine melanocytes with ssc-miR-221-3p mimic, the expression of ssc-miR-221-3p was significantly up-regulated (P< 0.01). Furthermore, the mRNA and protein levels ofTYR,TYRP1, andDCTgenes were significantly down-regulated (P< 0.01), and melanin content in cells was significantly reduced (P< 0.01).ConclusionTheTYRP1gene affects melanogenesis in melanocytes of Jianbai Xiang pigs, and ssc-miR-221-3p targets theTYRP1gene to regulate melanogenesis in melanocytes of Jianbai Xiang pigs.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12864-023-09451-w.