Sox9 is a transcription factor expressed in most solid tumors. However, the molecular mechanisms underlying Sox9 function during tumorigenesis remain unclear. Here, using a genetic mouse model of basal cell carcinoma (BCC), the most frequent cancer in humans, we show that Sox9 is expressed from the earliest step of tumor formation in a Wnt/β-catenin-dependent manner. Deletion of Sox9 together with the constitutive activation of Hedgehog signaling completely prevents BCC formation and leads to a progressive loss of oncogene-expressing cells. Transcriptional profiling of oncogene-expressing cells with Sox9 deletion, combined with in vivo ChIP sequencing, uncovers a cancer-specific gene network regulated by Sox9 that promotes stemness, extracellular matrix deposition, and cytoskeleton remodeling while repressing epidermal differentiation. Our study identifies the molecular mechanisms regulated by Sox9 that link tumor initiation and invasion.