Stormwater management ponds (SMPs) have emerged as a novel habitat for macroinvertebrates and other aquatic organisms in urban environments. Designed as infrastructure to ameliorate water quality and prevent flooding, these highly degraded systems have received growing attention for their unintended habitat function over the past decade. However, existing research on the value of SMPs as aquatic habitats and the drivers of diversity in these systems is sparce and often contradictory, making a more general understanding of how invertebrate communities assemble and function in SMPs difficult to ascertain. To glean a broader understanding, we examined the relative importance of species sorting and dispersal limitation in structuring SMP communities and explored how the importance of these processes depended on functional traits of organisms. We used macroinvertebrate data from 30 SMPs around Toronto, Ontario, Canada to ask: i) What local and landscape factors determine diversity and community structure of invertebrate communities in SMPs?; ii) Is there evidence of dispersal limitation and environmental filtering in structuring invertebrate communities?; iii) Do the importance of spatial structure and environmental conditions depend on dispersal traits?; and iv) How do invertebrate functional and life history traits respond to environmental factors in SMPs? We find that despite poor environmental conditions, SMPs show trends predicted by classic ecological theory in natural environments, with strong environmental filtering structuring flying invertebrate communities and dispersal limitation structuring flightless community composition across the landscape. We find important roles for a variety of water chemistry and pond morphometry parameters in structuring diversity, function and community composition. Our work helps to better understand the habitat role that SMPs are performing in urban environments and provides a compelling case for the management of these systems as both habitat and infrastructure.