Muscle loss is a serious complication in patients with diabetes mellitus (DM) and chronic kidney disease (CKD). However, studies on a long-term change in muscle mass presence or absence of DM and CKD are scarce. We included 6247 middle-aged adults from the Korean Genome and Epidemiology Study (KoGES) between 2001 and 2016. Bioimpedance analysis (BIA) was performed biennially. Patients were classified into four groups according to the presence or absence of DM and CKD. The primary outcome was muscle depletion, which was defined as a decline in fat-free mass index (FFMI) below the 10th percentile of all subjects. The secondary outcomes included the occurrence of cachexia, all-cause mortality, and the slopes of changes in fat-free mass and weight. During 73,059 person-years of follow-up, muscle depletion and cachexia occurred in 460 (7.4%) and 210 (3.4%), respectively. In the multivariable cause-specific hazards model, the risk of muscle depletion was significantly higher in subjects with DM alone than in those without DM and CKD (HR, 1.37; 95% CI, 1.04–1.80) and was strongly pronounced in subjects with both conditions (HR, 3.38; 95% CI, 1.30–8.75). The secondary outcome analysis showed consistent results. The annual decline rates in FFMI, fat mass, and body mass index (BMI) were the steepest in subjects with DM and CKD among the four groups. DM and CKD are synergically associated with muscle loss over time. In addition, the mortality risk is higher in individuals with muscle loss.