Background. Human leishmaniasis, both visceral and cutaneous, has been reported in Morocco for centuries and constitutes a serious public health problem. However, the evolution of this pathology depends on several factors such as ecological, socioeconomic, and climatic conditions. The risk study of the affected foci is of great value for the control and surveillance of this endemic disease, especially in the provinces where Leishmania infantum predominates. Methods. This study concerned nine provinces located in the extreme and central north of Morocco (Taounate, Taza, Chefchaouen, Al Hoceima, Larache, Tétouane, Tanger-Assilah, M’diq-Fnideq, and Fahs-Anjra Provinces). In this work, leishmaniasis cases (VL and CL) were subjected to an epidemiological study which was performed using a linear regression model to identify the impact as well as the interaction between all predictor variables on the distribution of leishmaniasis in this region. Results. During the period 1997–2018, a total of 6 128 cases of VL and CL were recorded in the study area. Our results showed that among demographic factors studied, urbanization showed significance for both cutaneous and visceral forms (P<0.05). Regarding the environmental factors, the humidity and the altitude were significant for both CL and VL (P<0.05), while the temperature and the normalized difference vegetation index (NDVI) showed a significance only for VL. Moreover, trends in season of occurrence revealed that wet season (October to April) had a higher incidence of leishmaniasis compared to the dry season (May to September) specifically for CL. As for socioeconomic factors, poverty was the only factor that influences the spread of VL. Finally, the distance from endemic foci showed significance for both VL and LC (P<0.05). Conclusion. Our study revealed that the risk factor associated with cutaneous and visceral leishmaniasis in northern Morocco could help in the establishment of a prediction program.