Whether starchy and nonstarchy vegetables have distinct impacts on health remains unknown. We prospectively investigated the intake of starchy and nonstarchy vegetables in relation to mortality risk in a nationwide cohort. Diet was assessed using 24-h dietary recalls. Deaths were identified via the record linkage to the National Death Index. Hazard ratios (HRs) and 95% confidence intervals (CIs) were calculated using Cox regression. During a median follow-up of 7.8 years, 4,904 deaths were documented among 40,074 participants aged 18 years or older. Compared to those with no consumption, participants with daily consumption of ≥ 1 serving of nonstarchy vegetables had a lower risk of mortality (HR = 0.76, 95% CI: 0.66-0.88, ptrend = 0.001). Dark-green and deep-yellow vegetables (HR = 0.79, 95% CI: 0.63-0.99, ptrend = 0.023) and other nonstarchy vegetables (HR = 0.80, 95% CI: 0.70-0.92, ptrend = 0.004) showed similar results. Total starchy vegetable intake exhibited a marginally weak inverse association with mortality risk (HR = 0.89, 95% CI: 0.80-1.00, ptrend = 0.048), while potatoes showed a null association (HR = 0.93, 95% CI: 0.82-1.06, ptrend = 0.186). Restricted cubic spline analysis suggested a linear dose‒response relationship between vegetable intake and death risk, with a plateau at over 300 and 200 grams/day for total and nonstarchy vegetables, respectively. Compared to starchy vegetables, nonstarchy vegetables might be more beneficial to health, although both showed a protective association with mortality risk. The risk reduction in mortality plateaued at approximately 200 grams/day for nonstarchy vegetables and 300 grams/day for total vegetables.