Smoking after a cancer diagnosis increases mortality and risk for a second cancer. To determine the association between time of entry into a smoking cessation intervention following a cancer diagnosis and survival outcomes. Using a prospective cohort study design, patients with cancer who smoked and received cessation treatment were assessed at 3 months, 6 months, and 9 months following tobacco treatment onset. Survival outcomes of tobacco treatment were measured and compared among patients at the MD Anderson Cancer Center Tobacco Research and Treatment Program. Treatment occurred between January 1, 2006, and March 3, 2022. Patients were excluded if they died before the tobacco treatment ended, received their diagnosis more than 6 months after beginning cessation treatment, or lacked staging information. The data analysis took place from September 2023 to May 2024. Cessation treatment consisted of 6 to 8 personalized counseling visits and 10 to 12 weeks of pharmacotherapy. More than 95% of visits were provided via telemedicine. The primary outcomes were survival as recorded in the MD Anderson Cancer Center tumor registry and 7-day point prevalence abstinence at each follow-up. The main analytical sample consisted of 4526 currently smoking patients diagnosed with cancer and receiving cessation treatment (2254 [49.8%] female; median [IQR] age, 55 [47-62] years). Survival over 15 years increased for those quitting smoking at 3 months (adjusted hazard ratio [aHR], 0.75 [95% CI, 0.67-0.83]), 6 months (aHR, 0.79 [95% CI, 0.71-0.88]), and 9 months (aHR, 0.85 [95% CI, 0.76-0.95]) of follow-up. The optimal survival outcomes were observed for patients who received tobacco treatment within 6 months of a cancer diagnosis. At the 75th percentile, their survival increased from 2.1 years (95% CI, 1.8-2.4 years) among continuing smokers (nonabstainers) vs 3.9 years (95% CI, 3.2-4.6 years) for patients who quit (abstainers). Similar but less pronounced outcomes were noted when tobacco treatment began within 6 months to 5 years following diagnosis, with survival at the 75th percentile of 4.8 years (95% CI, 4.3-5.3 years) for nonabstainers vs 6.0 years (95% CI, 5.1-7.2 years) for abstainers. The results of this prospective cohort study suggest that evidence-based smoking cessation treatment within 6 months following a cancer diagnosis maximizes survival benefit. This study supports smoking cessation as an important early clinical intervention for patients after being diagnosed with cancer.