Exploring sociodemographic effect modification is important to provide evidence for developing targeted recommendations and reducing health inequalities. This study evaluated how sociodemographic factors including age, sex, race/ethnicity and socioeconomic status (SES) modify the association between leisure-time physical activity (LTPA) and all-cause and major cause-specific mortality. The study sample included 471,992 people from the 1997-2018 National Health Interview Survey (NHIS) and 41,830 people from the 1999-2018 National Health and Nutrition Examination Survey (NHANES). Data were analyzed in December 2022. Mortality data from the National Death Index were available to December 31, 2019. Sufficient LTPA was defined as at least 150 minutes of moderate and/or vigorous intensity per week. There were 46,289 deaths in NHIS participants and 4,617 deaths in NHANES participants during a mean follow-up of 10 years. Individuals with sufficient LTPA had lower risk of all-cause (NHIS: hazard ratio, 0.74, 95% CI: [0.74-0.74]; NHANES: 0.73 [0.68-0.79]) and cardiovascular mortality (NHIS: 0.75 [0.75-0.75]; NHANES: 0.80 [0.69-0.93]) compared with inactive participants. The subgroup analysis showed significant interactions between LTPA and all sociodemographic factors. Associations between LTPA and mortality were weaker among younger individuals, males, Hispanic adults or those of low SES, respectively. Sociodemographic factors significantly modified the associations between LTPA and mortality. The health benefits of sufficient LTPA were smaller in younger individuals, males, Hispanic adults or those of low SES. These findings can help identify target populations for promotion of physical activity to reduce health inequalities and the development of physical activity guidelines.