Eating duration and shift work can both influence metabolic regulation, but their joint associations with diabetes are unknown. We aimed to examine the independent and joint associations of eating duration and shift work with diabetes in a cross-sectional study using a nationally representative sample of US workers. We included 14852 eligible participants from the National Health and Nutrition Examination Survey, 2005–2010 and 2017–2020. Eating duration was calculated based on first and last eating occasions from 24-h dietary recalls. Long eating duration (LED: ≥ 13 h) v. short eating duration (SED: < 13 h) was defined based on the median. Workers were classified as engaging in shift work (SW, n 5140) v. non-shift work (NSW, n 8945) based on self-report. Logistic regressions were used to examine the associations of LED and SW with diabetes, independently and jointly with stratification by age. LED was associated with higher odds of diabetes among workers aged < 45 years (OR, 1·51; 95 % CI, 1·05–2·19) but not among workers aged ≥ 45 years (OR, 0·98; 95 % CI, 0·79–1·20). SW was associated with higher odds of diabetes among both younger (OR, 1·28; 95 % CI, 0·88–1·85) and older workers (OR, 1·28; 95 % CI, 1·04–1·58). There was suggestive evidence that workers with both LED and SW had higher odds of diabetes compared with those with SED and NSW, but the association was stronger among younger (OR, 1·40; 95 % CI, 0·85–2·28) than older workers (OR, 1·28; 95 % CI, 0·99–1·66). LED and SW were independently associated with increased odds of diabetes with suggestive evidence on their joint associations, but associations varied by workers’ age.