The steroidal glycoalkaloids (SGAs) produced in Solanaceae crops, including tomato, are antinutritional because of their cellular toxicity and resultant bitter taste to humans. To make fruits palatable, SGA profiles shift from bitter and toxic α-tomatine to nonbitter and nontoxic esculeoside A during the ripening process. However, the mechanisms regulating this conversion remain unclear. In this study, we showed that removal of toxic and bitter SGAs is under the control of DNA demethylation, ethylene, and key transcription factors by forming a feedback loop that governs the expression of key GLYCOALKALOID METABOLISM ( GAME ) genes during ripening. Moreover, the ethylene-inducible transcription factors NON-RIPENING, RIPENING INHIBITOR, and FRUITFULL1 coordinately regulate the expression of GAME31 , GAME40 , GAME5 , and the glycoalkaloid transporter gene GORKY , whereas jasmonic acid–induced MYC2 modulates the transcription of GAME36 . Furthermore, DNA demethylation mediated by the DEMETER - LIKE 2 drives SGA detoxification during tomato domestication.