(1) Background: Reduced magnesium (Mg) levels may be associated with a faster de-cline in renal function. The aim of this study was to evaluate the association of serum and uri-nary Mg levels with body composition and inflammatory markers; (2) Methods: Lon-gitudinal study with patients with chronic kidney disease undergoing non-dialysis treatment in stages 3A, 3B and 4. Venous samples were collected after a 12-hour night fast. Body composition was evaluated by Double X-Ray Emission Absorptiometry and Air Displacement Plethysmog-raphy; (3) Results: The sample consisted of 134 patients. In the adjusted linear regression model, uric acid, percentage of lean mass and ali-mentar intake of Mg were positively associated with the sergic Mg. Triglyceride levels, WC and fat mass percentage were negatively associated with serum Mg. For the Mg urinal, in the adjusted model, the eGFR (estimated glomerular filtration rate), IL (interleukin 6), food intake of Mg and the percentage of lean mass showed a positive correlation.; (4) Conclusions: Serum Mg levels were positively associated with lean mass and negatively with total and central body fat and urinary Mg was positively associated with IL6 and lean mass.