Abstract Introduction Chronic systemic inflammation was proposed as a critical factor in the development of osteoporosis. We aim to investigate the effect of the DII on bone mineral density (BMD) in CKD patients. Methods 2276 participants from NHANES were enrolled. The DII score was calculated based on a single 24‐h dietary recall. Total BMD was measured using Dual‐energy x‐ray absorptiometry. A multiple‐stepwise linear regression model was used to determine associations between BMD and DII in CKD patients. Results When DII >0.35, a negative correlation was obtained between DII and BMD (all β = −0.008 and p < 0.05). In subgroup analysis, BMD levels decreased across increasing tertiles of the DII for patients with non‐osteoporosis, postmenopause, and low eGFR ( p for trend ≤0.01). Conclusion Higher consumption of pro‐inflammatory diet correlates negatively with the BMD levels in CKD patients.