Basic helix-loop-helix (bHLH) transcription factors extensively affect various physiological processes in plant metabolism, growth, and abiotic stress. However, the regulation mechanism of bHLH transcription factors in balancing anthocyanin biosynthesis and abiotic stress in sweet potato (Ipomoea batata (L.) Lam.) remains unclear. Previously, transcriptome analysis revealed the genes that were differentially expressed among the purple-fleshed sweet potato cultivar 'Jingshu 6' and its anthocyanin-rich mutant 'JS6-5'. Here, we selected one of these potential genes, IbMYC2, which belongs to the bHLH transcription factor family, for subsequent analyses. The expression of IbMYC2 in the JS6-5 storage roots is almost four-fold higher than Jingshu 6 and significantly induced by hydrogen peroxide (H2O2), methyl jasmonate (MeJA), NaCl, and polyethylene glycol (PEG)6000. Overexpression of IbMYC2 significantly enhances anthocyanin production and exhibits a certain antioxidant capacity, thereby improving salt and drought tolerance. In contrast, reducing IbMYC2 expression increases its susceptibility. Our data showed that IbMYC2 could elevate the expression of anthocyanin synthesis pathway genes by binding to IbCHI and IbDFR promoters. Additionally, overexpressing IbMYC2 activates genes encoding reactive oxygen species (ROS)-scavenging and proline synthesis enzymes under salt and drought conditions. Taken together, these results demonstrate that the IbMYC2 gene exercises a significant impact on crop quality and stress resistance.