Multimorbidity has become a major public health problem among Chinese middle-aged and older adults, and the most costly to the health care system. However, most previous population-based studies of multimorbidity have focused on a limited number of chronic diseases, and diagnosis was based on participants' self-report, which may oversimplify the problem. At the same time, there were few reports on the relationship between multimorbidity patterns and health care costs. This study analyzed the multimorbidity patterns and changes among middle-aged and older people in China over the past decade, and their association with medical costs, based on representative hospital electronic medical record data. Two cross-sectional surveys based on representative hospital data were used to obtain adults aged 45 years and older in Xiangyang in 2013 (n = 20,218) and 2023 (n = 63,517). Latent Class Analysis was used to analyze changes in the patterns of multimorbidity, gray correlation analysis and ordered logistics model were used to assess the association of multimorbidity patterns with medical expenses. The diagnosis and classification of chronic diseases were based on the International Classification of Diseases, Tenth Revision codes (ICD-10). The detection rate of chronic disease multimorbidity has increased (70.74 vs. 76.63%, p < 0.001), and multimorbidity patterns have increased from 6 to 9 (2013: Malignant tumors pattern, non-specific multimorbidity pattern, ischemic heart disease + hypertension pattern, cerebral infarction + hypertension pattern, kidney disease + hypertension pattern, lens disease + hypertension pattern; new in 2023: Nutritional metabolism disorders + hypertension pattern, chronic lower respiratory diseases + malignant tumors pattern, and gastrointestinal diseases pattern) in China. The medical cost of all multimorbidity patients have been reduced between 2013 and 2023 (RMB: 8216.74 vs. 7247.96, IQR: 5802.28-15,737 vs. 5014.63-15434.06). The top three specific multimorbidity patterns in both surveys were malignancy tumor pattern, ischemic heart disease + hypertension pattern, and cerebral infarction + hypertension pattern. Hypertension and type 2 diabetes are important components of multimorbidity patterns. Compared with patients with a single disease, only lens disorders + hypertension pattern were at risk of higher medical costs in 2013 (aOR:1.23, 95% CI: 1.03, 1.47), whereas all multimorbidity patterns were significantly associated with increased medical costs in 2023, except for lens disorders + hypertension (aOR:0.35, 95% CI: 0.32, 0.39). Moreover, the odds of higher medical costs were not consistent across multimorbidity patterns. Among them, ischemic heart disease + hypertension pattern [adjusted odds ratio (aOR):4.66, 95%CI: 4.31, 5.05] and cerebral infarction + hypertension pattern (aOR: 3.63, 95% CI: 3.35, 3.92) were the two patterns with the highest risk. Meanwhile, men (aOR:1.12, 95CI:1.09, 1.16), no spouse (aOR:1.09, 95CI: 1.03, 1.16) had a positive effect on medical costs, while patients with total self-pay (aOR: 0.45, 95CI: 0.29, 0.70), no surgery (aOR: 0.05, 95CI: 0.05, 0.05), rural residence (aOR: 0.92, 95CI: 0.89, 0.95), hospitalization days 1-5 (aOR: 0.04, 95CI: 0.04, 0.04), and hospitalization days 6-9 (aOR: 0.15, 95CI: 0.15, 0.16) had a negative impact on medical costs. Multimorbidity patterns among middle-aged and older adults in China have diversified over the past decade and are associated with rising health care costs in China. Smart, decisive and comprehensive policy and care interventions are needed to effectively manage NCDS and their risk factors and to reduce the economic burden of multimorbidity on patients and the country.