objective To analyse the spatiotemporal patterns of leprosy occurrence in the North and Northeast regions of Brazil from 2001 to 2017. methods Mixed population-based ecological study with spatial and temporal trend analysis of epidemiological indicators based on new cases reported to the Information System for Notifiable Diseases of the Ministry of Health occurring in individuals residing in North and Northeast states of Brazil.results A total of 396 987 new cases were analysed; 9.2% of these involved children <15 years of age, and 5.4% involved individuals with grade 2 disability (G2D). The Northeast region recorded 66.4% of the new cases. Most cases involved males between 15 and 59 years of age and of brown race/colour. The temporal trend showed a reduction in most of the indicators and study variables. The G2D rate did not have trends over time in the Northeast Region, in individuals 0-14 years of age, or in municipalities with 'very high' social vulnerability indexes. The spatial and spatiotemporal analysis showed the presence of hyperendemic foci with high detection risk involving municipalities in the states of Tocantins, Par a and Maranhão.conclusion Leprosy in the North and Northeast regions of Brazil persists as a critical public health problem. Temporal and spatiotemporal patterns identified in this study confirm that leprosy remains epidemiologically relevant in vulnerable areas. Surveillance and control interventions are needed in municipalities with low detection in the general population, in children and in individuals with G2D, to reduce late diagnosis.keywords leprosy, epidemiology, spatial analysis, prevention and control, Brazil Sustainable Development Goals (SDGs): SDG 1 (no poverty), SDG 2 (zero hunger), SDG 3 (good health and well-being), SDG 4 (quality education), SDG 10 (reduced inequalities), SDG 17 (partnerships for the goals)