BACKGROUND: Patients with cancer are known to be at increased risk for suicide but little is known about the interaction between cancer and psychiatric diagnoses, another well-documented risk factor. METHODS: Electronic medical records from nine healthcare systems participating in the Mental Health Research Network were aggregated to form a retrospective case-control study, with ICD-9 codes used to identify diagnoses in the 1 year prior to death by suicide for cases (N = 3330) or matching index date for controls (N = 297,034). Conditional logistic regression was used to assess differences in cancer and psychiatric diagnoses between cases and controls, controlling for sex and age. RESULTS: Among patients without concurrent psychiatric diagnoses, cancer at disease sites with lower average 5-year survival rates were associated with significantly greater relative risk, while cancer disease sites with survival rates of >70% conferred no increased risk. Patients with most psychiatric diagnoses were at higher risk, however, there was no additional risk conferred to these patients by a concurrent cancer diagnosis. CONCLUSION: We found no evidence of a synergistic effect between cancer and psychiatric diagnoses. However, cancer patients with a concurrent psychiatric illness remain at the highest relative risk for suicide, regardless of cancer disease site, due to strong independent associations between psychiatric diagnoses and suicide. For patients without a concurrent psychiatric illness, cancer disease sites associated with worse prognoses appeared to confer greater suicide risk.