Plague is a zoonotic disease caused by Yersinia pestis, and it is endemic in Madagascar. The plague cycle involves wild and commensal rodents and their fleas; humans are an accidental host. Madagascar is the country where plague burden is the highest. Plague re-emerged in Mahajanga, the western coast of Madagascar, in the 1990s and infected populations in the popular and insalubrious zones. Sanitation is considered a primary barrier to infection by excluding pathogens from the environment and reservoirs. Poor housing and hygiene and proximity to rodents and fleas in everyday life are major and unchanged risk factors of plague. The aim of this study was to measure the impact of sanitation on Yersinia pestis bacteria in human and small mammal reservoirs and flea vectors. This study was conducted on 282 households within 14 neighborhoods. Two sessions of sampling were conducted in 2013 and 2016. Small mammals were trapped inside and around houses using live traps. Fleas, blood and spleen were sampled to detect Y. pestis infection and antibodies and determine the level of plague circulation before and after the installation of sanitation in order to assess the impact of sanitation improvement on inhabitant health. Two major types of housing can be described, i.e., formal and informal (traditional), scattered in all the suburbs. Among the small mammals captured, 48.5% were Suncus murinus, and 70% of houses were infested. After sanitation, only 30% of houses remained infested, and most of them were located around the market. Fleas were mostly Xenopsylla cheopis. Before and after intervention, the overall prevalence of fleas was the same (index 4.5) across the 14 suburbs. However, the number of houses with fleas drastically decreased, and the flea index increased significantly in rodent-infested houses. Rodent abundance also decreased from 17.4% to 6.1% before and after intervention, respectively. A serology study highlights that plague is still circulating in Mahajanga, suggesting that small mammals maintain enzootic plague transmission in the city.