Sub-Saharan Africa (SSA) is undergoing rapid urbanization, yet research comparing urban expansion and agricultural land loss in peri-urban areas is scarce. This study utilizes multi-temporal Landsat imagery to examine the impact of urban growth on agricultural land and fragile ecosystems in Kampala (a mega city) and Mbarara (a regional urban center) in Uganda. We distinguish between random and systematic land-use and land-cover (LULC) transitions in the landscape. The results reveal substantial urban expansion. Kampala’s urban area surged from 7.14% in 1989 to 55.10% in 2015, while Mbarara increased from 6.37% in 2002 to 30.95% in 2016. Correspondingly, agricultural land decreased, from 48.02% to 16.69% in Kampala, and from 39.92% to 32.08% in Mbarara. Notably, a significant proportion of urban growth in both cities encroached upon agricultural land (66.7% in Kampala and 57.8% in Mbarara). The transition from agricultural to built-up areas accounted for 14.72% to 28.45% of the landscapes. Additionally, unsustainable practices led to the conversion of wetlands and forests to agricultural land, with approximately 13% of wetlands and 23% of Savannah and forests being converted between 2001 and 2015. These findings underscore the necessity of monitoring LULC changes for sustainable urban growth management, emphasizing the importance of preserving agricultural land and ecosystems to ensure present and future food security. This research contributes to the understanding of urbanization’s impact on peri-urban agricultural land and ecosystems in SSA, providing insights that are crucial for informed urban planning and policy formulation aimed at sustainable development in the region.