Background: The new nomenclature of metabolic dysfunction-associated steatotic liver disease (MASLD) substituting nonalcoholic fatty liver disease was proposed along with a new category of MASLD with increased alcohol intake (MetALD). Aims: We aimed to explore the cancer risk by MASLD and MetALD. Methods: This nationwide cohort study included 3,596,709 participants who underwent a health check-up in 2011 in South Korea. Steatotic liver disease (SLD) was defined as a fatty liver index >= 30. Participants were categorized into four exclusive groups: MASLD, MetALD, other combination aetiology and no SLD. The subdistribution hazard ratio (SHR) was calculated using the Fine-Gray model after adjusting other variables. Results: During the 33.9 million person-years of follow-up, 285,845 participants (7.9%) developed cancers. Compared with no SLD, MASLD, MetALD and other combination aetiology had an increased risk of all cancer. Liver cancer risk escalated from no SLD to MASLD (SHR, 1.16; 95% CI, 1.12-1.21), MetALD (SHR, 2.06; 95% CI, 1.92-2.20) and other combination aetiology (SHR, 8.16; 95% CI, 7.69-8.67). Gastrointestinal cancers including oesophagus, stomach, colorectal, biliary and pancreas cancers increased in MASLD (SHR, 1.13; 95% CI, 1.11-1.15), MetALD (SHR, 1.17; 95% CI, 1.14-1.21) and other combination aetiology (SHR, 1.09; 95% CI, 1.05-1.13). A modest increase in lung cancer and hormone-sensitive cancer was observed with MASLD. Conclusions: This study showed that MASLD and MetALD are associated with an increased risk of cancer, particularly liver and gastrointestinal cancers. The findings build new evidence for the clinical outcomes of MetALD while highlighting the importance of managing alcohol intake properly in MASLD and MetALD.