Background Osteoporosis and arthritis are two common orthopedic diseases in the general population, with multiple common risk factors. The purpose of this study was to evaluate the correlation between osteoporosis (OP) and arthritis.Methods This cohort study included 13,310 eligible participants aged over 40 years with valid data on hypertension and arthritis from the National Health and Nutrition Examination Survey (NHANES) 2005–2020 (pre-pandemic). The association between osteoporosis and arthritis was studied by logistic regression, adjusted for demographic, socioeconomic factors, insufficient calcium intake, physical activity, smoking history, hypertension, diabetes, body mass index (BMI), blood calcium levels, blood phosphorus levels, and blood uric acid levels.Results Among the participants, 10267 (77.14%) had osteopenia or osteoporosis, and 4230 (31.78%) had self-reported arthritis. Osteoporosis was associated with arthritis [OR = 2.388, (95% CI: 2.111–2.702), P < 0.001], which remained significant [OR = 1.222, (95% CI: 1.046–1.428), P = 0.011] after adjustment. Stratified by the types of arthritis, the association remained significant in rheumatoid arthritis (RA) [OR = 1.206, (95% CI: 1.044–1.394), P = 0.013] and osteoarthritis (OA) [OR = 1.427, (95% CI: 1.307–1.558), P < 0.001]. There was no clear association between osteoporosis and OA in 40–60 years old [OR = 1.231, (95% CI: (0.976–1.551), P = 0.093] or male participants [OR = 1.213, (95% CI:0.991–1.484), P = 0.069]. There was no clear association between osteoporosis and RA in participants over 60 years old [OR = 0.901, (95% CI: 0.734–1.078), P = 0.126] or female [OR = 1.031, (95% CI: 0.850–1.258), P = 0.725].Conclusions In this large nationally representative survey, arthritis (including RA and OA) is closely related to osteoporosis. Our study shows that patients with arthritis need osteoporosis screening and bone mineral density monitoring.