Diabetes mellitus (DM) is a risk factor for the development of ulnar nerve entrapment (UNE). Differences in surgical outcomes for UNE between patients with and without DM have been reported, but studies on presurgical management are scarce. This study aimed to evaluate the presurgical management of UNE in patients with (DM diagnosis < 2 years of UNE diagnosis) and without DM regarding the level of care for diagnosis and the proportion that proceeds to surgery. Data from 6600 patients with UNE between 2004 and 2019 were included from the Skåne Health Care Register (SHR) and cross-linked with data from the Swedish National Diabetes Register (NDR). The group with UNE and DM was compared to the group with UNE without DM and prevalence ratios were calculated using Cox regression analysis. Patients with DM more often got their first UNE diagnosis in secondary care than in primary care (643/667, 96% vs. 5361/5786; 93%). Patients with and without DM, regardless of the type of DM, presence of retinopathy, or HbA1c levels, were surgically treated for UNE to the same extent (258/667, 39% of patients with DM vs. 2131/5786, 37% of patients without DM). The proportion of surgically treated was significantly lower among patients diagnosed with UNE in primary care compared to secondary care (59/449, 13% vs. 2330/5786, 38%). Men were more often surgically treated than women (1228/3191, 38% vs.1161/3262 36%). Patients with UNE and DM are surgically treated to the same extent as patients with UNE but without DM and are more likely to be diagnosed in specialized care.