Oral squamous cell carcinomas are a major cause of morbidity and mortality, and tobacco usage, alcohol consumption, and poor oral hygiene are established risk factors. To date, no large-scale case-control studies have considered the effects of these risk factors on the composition of the oral microbiome, nor microbial community associations with oral cancer. We compared the composition, diversity, and function of the oral microbiomes of 121 oral cancer patients to 242 age- and gender-matched controls using a metagenomic multivariate analysis pipeline. Significant shifts in composition and function of the oral microbiome were observed with poor oral hygiene, tobacco smoking, and oral cancer. Specifically, we observed dramatically altered community composition and function after tooth loss, with smaller alterations in current tobacco smokers, increased production of antioxidants in individuals with periodontitis, and significantly decreased glutamate metabolism metal transport in oral cancer patients. Although the alterations in the oral microbiome of oral cancer patients were significant, they were of substantially lower effect size relative to microbiome shifts after tooth loss. Alterations following tooth loss, itself a major risk factor for oral cancer, are likely a result of severe ecological disruption due to habitat loss but may also contribute to the development of the disease.