Whether starchy and non-starchy vegetables have distinct impacts on health remains unknown. We prospectively investigated the intake of starchy and non-starchy 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 (HR) and 95 % CI were calculated using Cox regression. During a median follow-up of 7·8 years, 4904 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 non-starchy vegetables had a lower risk of mortality (HR = 0·76, 95 % CI 0·66, 0·88, P
trend = 0·001). Dark-green and deep-yellow vegetables (HR = 0·79, 95 % CI 0·63, 0·99, P
trend = 0·023) and other non-starchy vegetables (HR = 0·80, 95 % CI 0·70, 0·92, P
trend = 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, P
trend = 0·048), while potatoes showed a null association (HR = 0·93, 95 % CI 0·82, 1·06, P
trend = 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 g/d for total and non-starchy vegetables, respectively. Compared with starchy vegetables, non-starchy 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 g/d for non-starchy vegetables and 300 g/d for total vegetables.