BACKGROUND: Leptospirosis is an endemic disease in countries with tropical climates such as South America, Southern Asia, and Southeast Asia. There has been an increase in leptospirosis incidence in Malaysia from 1.45 to 25.94 cases per 100,000 population between 2005 and 2014. With increasing incidence in Selangor, Malaysia, and frequent climate change dynamics, a study on the disease hotspot areas and their association with the hydroclimatic factors could enhance disease surveillance and public health interventions. METHODS: This ecological cross-sectional study utilised a geographic information system (GIS) and remote sensing techniques to analyse the spatiotemporal distribution of leptospirosis in Selangor from 2011 to 2019. Laboratory-confirmed leptospirosis cases ( RESULTS: Moran's I analysis revealed a primarily random distribution of cases across Selangor, with only 20 out of 103 observed having a clustered distribution. Meanwhile, hotspot areas were mainly scattered in subdistricts throughout Selangor with clustering in the central region. Machine learning analysis revealed that the LGBM algorithm had the best performance scores compared to having a cross-validation score of 0.61, a precision score of 0.16, and an F1-score of 0.23. The feature importance score indicated river water level and rainfall contributes most to the model. CONCLUSIONS: This GIS-based study identified a primarily sporadic occurrence of leptospirosis in Selangor with minimal spatial clustering. The LGBM algorithm effectively predicted leptospirosis hotspots based on the analysed hydroclimatic factors. The integration of GIS and machine learning offers a promising framework for disease surveillance, facilitating targeted public health interventions in areas at high risk for leptospirosis.