A higher dietary intake or serum concentration of betaine has been associated with greater lean body mass in middle-aged and older adults. However, it remains unknown whether betaine intake is associated with age-related loss of skeletal muscle mass (SMM). We assessed the association between dietary betaine intake and relative changes in SMM after 3 years in middle-aged adults. A total of 1242 participants aged 41–60 years from the Guangzhou Nutrition and Health Study 2011–2013 and 2014–2017 with body composition measurements by dual-energy X-ray absorptiometry were included. A face-to-face questionnaire was used to collect general baseline information. After adjustment for potential confounders, multiple linear regression found that energy-adjusted dietary betaine intake was significantly and positively associated with relative changes (i.e. percentage loss or increase) in SMM of legs, limbs and appendicular skeletal mass index (ASMI) over 3 years of follow-up (β 0·322 (se 0·157), 0·309 (se 0·142) and 0·303 (se 0·145), respectively; P < 0·05). The ANCOVA models revealed that participants in the highest betaine tertile had significantly less loss in SMM of limbs and ASMI and more increase in SMM of legs over 3 years of follow-up, compared with those in the bottom betaine tertile (all Ptrend < 0·05). In conclusion, our findings suggest that elevated higher dietary betaine intake may be associated with less loss of SMM of legs, limbs and ASMI in middle-aged adults.