Frailty has become a public health challenge in China. To investigate the association of foods consumption and physical activity with prefrailty and frailty among older Chinese adults in urban communities. In a cross-sectional study from February to July 2023, 1183 older adults aged between 65y-88y were enrolled from urban communities in Chongqing and Shandong province, China. Frailty Index (FI) was applied to measure prefrailty and frailty. Partial proportional odds model was used to assess the association between foods consumption, physical activity and prefrailty/frailty. Higher Dietary Diversity Score (DDS), (OR=0.61, 95% CI=0.46-0.80; OR=0.47, 95% CI=0.28-0.79), Consuming animal-based foods ≥2 times/day (OR=0.62, 95% CI=0.47-0.82; OR=0.54, 95% CI=0.33-0.88), soy products ≥2 times/week (OR=0.69, 95% CI=0.53-0.89; OR=0.51, 95% CI=0.31-0.84), fresh vegetables ≥2 times/day (OR=0.42, 95% CI=0.31-0.57; OR=0.41, 95% CI=0.23-0.72), and nuts ≥2 times/week (OR=0.71, 95% CI=0.55-0.91; OR=0.52, 95% CI=0.32-0.85) was associated with a lower risk of prefrailty and frailty. In addition, higher frequency and longer duration of walking (OR=0.61, 95% CI=0.42-0.88; OR=0.63, 95% CI=0.48-0.81), exercise (OR=0.48, 95% CI=0.35-0.64; OR=0.44, 95% CI=0.32-0.61) per week were significantly associated with lower risk of prefrailty. Furthermore, higher frequency and longer duration of walking (OR=0.42, 95% CI=0.25-0.72; OR=0.46, 95% CI=0.29-0.74), and housework (OR=0.39, 95% CI=0.24-0.65; OR=0.57, 95% CI=0.34-0.96) per week, were significantly associated with lower frailty. Higher DDS and higher frequency of animal-based foods, soy products, fresh vegetables, and nuts consumption is significantly associated with lower risk of prefrailty and frailty. Additionally, walking and exercising are significantly associated with lower risk of prefrailty, while walking and doing housework is significantly associated with lower frailty.