Steroidal glycoalkaloids (SGAs) are a class of nitrogen-containing glycosides occurring in several plant families and biosynthesized through a specific pathway. HMG-CoA reductase is the first enzyme of this pathway, and its transcription can be regulated by biotic and abiotic stressors and even in a tissue-specific manner. This study aimed to characterize the HMG genes family in a tuber-bearing potato species, Solanum commersonii, using transcriptional and functional approaches. Our results provided evidence that four ScHMGs with different tissue-specificities represent the HMG gene family in S. commersonii and that they originated from ScHMG1 through segmental duplications. Phylogenetic analysis suggests that ScHMG1 is the direct ortholog of AtHMG1, which is associated with SGAs accumulation in plants. Its overexpression in S. commersonii revealed that this gene plays a key role in the accumulation of glycoalkaloids regulating the production of dehydrocommersonine.