We compared the relationship between sedentary activity (SA) and physical activity (PA) with bone mineral density (BMD) and body fat percentage in the United States and found a negative association between SA and BMD and a positive association with body fat percentage. A positive association between PA and BMD and a negative association with body fat percentage. SA and PA are associated with changes in skeletal parameters and body fat percentage, and we aimed to investigate and compare the relationship between SA, PA and bone mineral density (BMD) and body fat percentage in men and women. We assessed the relationship between SA, PA and BMD and body fat percentage in 9787 Americans aged 20–59 years (mean age 38.28 ± 11.39 years) from NHANES 2011–2018. BMD and body fat percentage were measured by dual-energy X-ray bone densitometry (DXA). We used multiple linear regression models to examine the relationships between SA, PA and lumbar spine BMD and total body fat percentage, adjusted for a large number of confounding factors. After adjusting for race/ethnicity, age, alcohol and smoking behavior, body mass index (BMI), total protein, blood calcium, blood uric acid, cholesterol, blood phosphorus, vitamin D, and blood urea nitrogen, SA was negatively associated with lumbar spine BMD (β = − 0.0011 95% CI − 0.0020 to − 0.0002,P= 0.022), and SA was positively associated with total fat percentage (β = PA was positively associated with lumbar BMD (β = 0.0046 95% CI 0.0010 to 0.0082,P= 0.012) and there was a negative association between PA and body fat percentage (β = − 1.177 95% CI − 1.326 to –1.027,P< 0.001). Our results show that physical activity is a key component of maintaining bone health in both men and women and is strongly associated with lower body fat percentages. Sedentary activity is negatively correlated with bone density and is strongly associated with an increase in body fat percentage. Healthcare policy makers should consider reducing sedentary activity and increasing physical activity when preventing osteoporosis and obesity.