Diet and nutrition are critical factors influencing cancer, the second leading cause of death worldwide. This study evaluated dietary risk factors and cancer mortality. 49,773 participants aged 40-75 years from the Golestan Cohort Study (GCS) were followed for a median of 15 years. Dietary intake was assessed using a validated food frequency questionnaire. Cox proportional hazard models estimated hazard ratios (HRs) and 95% confidence intervals (CIs), while population attributable fractions (PAFs) quantified the impact of reducing dietary risk factors. Low fruit intake accounted for 4.7% (95% CI: 0.5-8.7%) of all cancer deaths and 4.91% (95% CI: 0-9.85%) of male cancer deaths. It contributed to 23.5% (95% CI: 4.7-38.59%) of pancreatic cancer mortality in both sexes and 29.36% (95% CI: 5.15-47.38%) of male pancreatic cancer deaths. Low omega-3 intake increased esophageal and gastric cancer mortality risks, with PAFs of 21.65% (95% CI: 1.14-37.9%) and 21.46% (95% CI: 2.81-36.53%), respectively. In females, low omega-3 intake accounted for 38.68% (95% CI: 4.05-60.81%) of gastric cancer deaths. Low fruit and omega-3 consumption elevated cancer mortality risk. Community- and individual-level interventions are essential to enhance nutrient intake and reduce cancer mortality.