We evaluated the association between physical activity and cognitive function among a national sample of the broader U.S. adult population, with consideration by social risk. Data from the 1999-2002 National Health and Nutrition Examination Survey (NHANES) were used to identify 2031 older adults, ages 60-85. Social risk was classified by measuring four NHANES variables, namely poverty level, education, minority status, and social living status, which were graded on a scale of 0-4, with higher scores corresponding with higher social risk. The Digit Symbol Substitution Test (DSST) was used to assess cognitive function. Physical activity was assessed via a validated self-report questionnaire. After adjustments, meeting physical activity guidelines (vs not) was associated with greater cognitive function (β = 3.0, 95% CI [1.5, 4.4], p < 0.001). In this same model, social risk status was also independently associated with cognitive function. Meeting physical activity guidelines (vs. not) was not associated with higher cognitive function among those with a social risk score of of 3 (β = -0.01; 95% CI [-6.3, 6.4], p = 0.99) or a social risk score of 4 (β = -6.8, 95% CI [-15.7, 2.0], p = 0.12). In this national sample of older adults, meeting physical activity guidelines, and degree of social risk were independently associated with cognitive function. However, physical activity was not associated with cognitive function among older adults with the highest degree of social risk.