In multiple cancer types, high tumor mutational burden (TMB) is associated with longer survival after treatment with immune checkpoint inhibitors (ICIs). The association of TMB with survival outside of the immunotherapy context is poorly understood. We analyzed 10,233 patients (80% non-ICI-treated, 20% ICI-treated) with 17 cancer types before/without ICI treatment or after ICI treatment. In non-ICI-treated patients, higher TMB (higher percentile within cancer type) was not associated with better prognosis; in fact, in many cancer types, higher TMB was associated with poorer survival, in contrast to ICI-treated patients in whom higher TMB was associated with longer survival.