The COVID-19 pandemic and the great flood of 2021 significantly impacted society. However, masjids have proven effective institutions in disaster management efforts, particularly in social welfare. This study examines the role of masjids in managing disasters in Malaysia, specifically during the 2021 great flood and the COVID-19 pandemic. The qualitative research involves in-depth interviews based on case studies, with the results analyzed thematically. A total of 14 masjids as informants were selected from across Malaysia, including nine of the best masjids in 2021 and five with disaster management experience. The findings reveal that masjids are crucial in disaster management, encompassing services, health, placement, incentives, and infrastructure. These contributions help effectively manage the community during disasters. The study highlights two key factors contributing to the success of masjids in disaster management: the core concern of maqasid sharʿiah and the synergy of da’wah in strengthening the relationship between masjids and the community. The implications of this study contribute to both theory and practice, particularly in designing ideal masjid management, preserving community welfare, and maintaining the Sustainable Development Goals (SDGs).