The objective of this study was to describe dental prescriptions of non-steroidal anti-inflammatory drugs (NSAID), opioids, and analgesics dispensed by the Brazilian National Health System (BNHS, SUS in Portuguese) of a Southeastern state from January to December 2017, and to analyze their association with socioeconomic and oral health care services' characteristics at municipal level. Data were collected from the Brazilian Integrated Pharmaceutical Care Management System. Medicines were grouped according to the Anatomical Therapeutic Chemical Classification System. The total number of Defined Daily Doses (DDD) and DDD per 1,000 inhabitants (inhab.) per year were presented and compared between groups of municipalities. Data analysis used the Classification and Regression Tree model performed with IBM SPSS 25.0. The total number of NSAID, opioids, and analgesics prescriptions was 70,747 and accounted for 354,221.13 DDD. The most frequently prescribed medicine was ibuprofen (n = 24,676; 34.88%). The number of dental practitioners in the BNHS per 1,000 inhab. (p < 0.001), first dental appointment coverage (p = 0.010), oral health teams per 1,000 inhab. (p=0.022), and the proportion of rural population (p = 0.014) were variables positively associated with the number of DDD of NSAID per 1,000 inhab. per year. Bolsa Família program coverage per 1,000 inhab. (p = 0.022) was negatively associated with NSAID prescription. Regarding analgesics, first dental appointment coverage (p=0.002) and Bolsa Família program coverage per 1,000 inhab. (p = 0.012) were positively associated with DDD per 1,000 inhab. per year. In conclusion, dental prescriptions of analgesics and NSAID in the BNHS were associated with socioeconomic and oral health care services' characteristics.