Adult stem cells maintain tissue homeostasis by balancing selfrenewal and differentiation. In Drosophila females, germline stem cells (GSCs) require Sex lethal (Sxl) to exit the stem cell state and to enter the differentiation pathway. Without Sxl GSCs do not differentiate and instead form tumors. Previous studies have shown that these tumors are not caused by a failure in the self-renewal/ differentiation switch. Here, we show that Sxl is also necessary for the cell-autonomous maintenance of germ cell female identity and demonstrate that tumors are caused by the acquisition of male characteristics. Germ cells without Sxl protein exhibit a global derepression of testis genes, including Phf7, a male germline sexual identity gene. Phf7 is a key effector of the tumor-forming pathway, as it is both necessary and sufficient for tumor formation. In the absence of Sxl protein, inappropriate Phf7 expression drives tumor formation through a cell-autonomous mechanism that includes sex-inappropriate activation of Jak/Stat signaling. Remarkably, tumor formation requires a novel response to external signals emanating from the GSC niche, highlighting the importance of interactions between mutant cells and the surrounding normal cells that make up the tumor microenvironment. Derepression of testis genes, and inappropriate Phf7 expression, is also observed in germ cell tumors arising from the loss of bag of marbles (bam), demonstrating that maintenance of female sexual identity requires the concerted actions of Sxl and bam. Our work reveals that GSCs must maintain their sexual identity as they are reprogrammed into a differentiated cell, or risk tumorigenesis.