Rapid urbanization has greatly changed hydrological processes, physical habitats and biological community structure of rivers, and thus seriously threatens the functions, services and health of river ecosystems. Headwater streams closely link surrounding terrestrial ecosystems, providing a variety of micro-habitats, and are of great significance to biodiversity conservation. To explore macroinvertebrate community structure of the headwater streams in the highly urbanized areas and its relationship with environmental factors, we investigated the macroinvertebrates and the physicochemical properties of Yangmeikeng stream, a typical headwater stream in Shenzhen in the winter of 2020 and the summer of 2021. Our results showed that a total of 2794 individuals of macroinvertebrates were collected, which could be classified into 84 taxa, belonging to two classes, 10 orders and 56 families. The macroinvertebrate communities had high biodiversity and were dominated by aquatic insects. Many rare taxa were found with a relatively small population. There were no seasonal changes in functional feeding groups. Species abundance and individual abundance of collectors-gatherers were higher than other functional feeding groups. Environmental factors, including chemical oxygen demand, dissolved oxygen, conductivity, nitrate nitrogen, pH, water temperature, wetted area width, and flow velocity, explained the variations in macroinvertebrate community diversity. Our findings provide a data basis for the research and the protection of urbanized streams in southern China.