Tuberculosis (TB) cases have increased drastically over the last two decades and it remains as one of the deadliest infectious diseases in Malaysia. This cross-sectional study aimed to establish the spatial distribution of TB cases and its association with the sociodemographic and environmental factors in the Gombak district. The sociodemographic data of 3325 TB cases such as age, gender, race, nationality, country of origin, educational level, employment status, health care worker status, income status, residency, and smoking status from 1st January 2013 to 31st December 2017 in Gombak district were collected from the MyTB web and Tuberculosis Information System (TBIS) database at the Gombak District Health Office and Rawang Health Clinic. Environmental data consisting of air pollution such as air quality index (AQI), carbon monoxide (CO), nitrogen dioxide (NO2), sulphur dioxide (SO2), and particulate matter 10 (PM10,) were obtained from the Department of Environment Malaysia from 1st July 2012 to 31st December 2017; whereas weather data such as rainfall were obtained from the Department of Irrigation and Drainage Malaysia and relative humidity, temperature, wind speed, and atmospheric pressure were obtained from the Malaysia Meteorological Department in the same period. Global Moran’s I, kernel density estimation, Getis-Ord Gi* statistics, and heat maps were applied to identify the spatial pattern of TB cases. Ordinary least squares (OLS) and geographically weighted regression (GWR) models were used to determine the spatial association of sociodemographic and environmental factors with the TB cases. Spatial autocorrelation analysis indicated that the cases was clustered (p<0.05) over the five-year period and year 2016 and 2017 while random pattern (p>0.05) was observed from year 2013 to 2015. Kernel density estimation identified the high-density regions while Getis-Ord Gi* statistics observed hotspot locations, whereby consistently located in the southwestern part of the study area. This could be attributed to the overcrowding of inmates in the Sungai Buloh prison located there. Sociodemographic factors such as gender, nationality, employment status, health care worker status, income status, residency, and smoking status as well as; environmental factors such as AQI (lag 1), CO (lag 2), NO2 (lag 2), SO2 (lag 1), PM10 (lag 5), rainfall (lag 2), relative humidity (lag 4), temperature (lag 2), wind speed (lag 4), and atmospheric pressure (lag 6) were associated with TB cases (p<0.05). The GWR model based on the environmental factors i.e. GWR2 was the best model to determine the spatial distribution of TB cases based on the highest R2 value i.e. 0.98. The maps of estimated local coefficients in GWR models confirmed that the effects of sociodemographic and environmental factors on TB cases spatially varied. This study highlighted the importance of spatial analysis to identify areas with a high TB burden based on its associated factors, which further helps in improving targeted surveillance.