To investigate the potential linear relationship between serum concentrations of klotho and frailty. A retrospective analysis was conducted on the data of 9,597 middle-aged and older adults (aged 40-79 years) from the five cycles of the National Health and Nutrition Examination Survey (NHANES). Frailty was assessed using the Frailty Index, calculated as a percentage of accumulated deficits across 53 health items. Restricted cubic spline curves, subgroup analyses and logistic regression models were employed to evaluate the specific linear trend connection between circulating klotho protein concentration and frailty. When taking Klotho into account as a continuous component in Models 1 and 2, there was a substantial association between the increasing Klotho level and the reduced risk of frailty. Model 3 revealed a strong negative correlation between the Klotho and Frailty, suggesting that high levels of Klotho protein decreases the frailty prevalence [Odd ratio (OR): 0.25; 95% confidence interval (CI): 0.15-0.43]. Furthermore, according to the quartile analyses, after fully adjusting for the covariates, it was observed that, comparing to the lowest quartile of Klotho, the highest quartile of Klotho demonstrated lowest risk of frailty (OR 0.69; 95% CI 0.58-0.81, Ptrend < 0.001). The restricted cubic spline curves showed a linear relationship and an inverse association between frailty and the Klotho levels (Plinearity < 0.001; Pnon-linearity = 0.736). Klotho is inversely and linearly associated with physical frailty in the general population (aged 40-79 years), specifically in the population with an age < 65 and body mass index (BMI) ≥ 25 kg/m2. More necessary prospective studies should be done to further investigate the mechanisms underlying frailty and aging and to elucidate individual frailty causes.