AIMS The objective of this study is to explore the relationship between serum 25-hydroxyvitamin-D(25-(OH)2D3) level and sweat function in patients with type 2 diabetes mellitus (T2DM). METHODS A cross-sectional study of 1021 patients with T2DM who underwent 25-(OH)2D3 level detections and sweat function tests was carried out. These individuals were divided into deficient groups (n = 154 cases), insufficient groups (n = 593 cases) and sufficient groups (n = 274 cases). Spearman correlation analysis and multivariate stepwise linear regression analysis were implemented to determine the association of 25-(OH)2D3 level and sweat function. RESULTS The total presence of sweating dysfunction was 38.59%. Patients with a lower level of serum 25-(OH)2D3 had more severe sweat secretion impairment (P