The loss of biodiversity due to rapid urbanization can be mitigated by urban riparian corridors. As an important component of urban biodiversity, spontaneous herbaceous plants play an essential role in the ecological functions of urban river corridors. Currently, the influence of the landscape structure within corridors on plant diversity has been poorly understood. In this study, we investigated the species and functional diversity, especially the functional traits of origin, pollination, and dispersal, of spontaneous herbaceous plants in the Wenyu River-North Canal riparian corridor in Beijing. The results showed that urban riparian corridors have a positive effect on the spread of alien and invasive plants as well as increasing the native plant diversity. No significant differences in diversity indicators but significant differences in the composition of functional traits between habitat types. Plants with long pollination and dispersal distances tended to be more closely related to the landscape structure indices at larger scales. Invasive plants were more common in patches with significant connectivity, while native plants were positively correlated with water and road connectivity. Anemophilous and anemochores were more common in habitats with sinuous edges. Ant-dispersed plants were closely related to the water bodies. Autochores were positively correlated with the connectivity of habitat patches. Plants dispersed by birds and mammals were weakly correlated with landscape structure. Our study underlines that emphasis should be placed on the support for plant pollination and dispersal, together with the prevention and control of invasive plants in the construction and management of future urban ecological corridors.