In natural river systems in arid and semi-arid lands, surrounding floodplains may contain temporary wetlands. Some of these may be mainly rain-filled (endorheic systems) while others may be partly rain-fed but connect to the flooding river during a good rainy season (river-connected wetlands). However, how seasonal river flooding affects the community characteristics in temporary floodplain wetlands is not well understood. Here, we studied the role of seasonal river connections in modulating macroinvertebrate community structure in a set of temporary wetlands in a river-floodplain ecosystem in northeastern Tanzania. We compared macroinvertebrate communities of a set of endorheic versus river-connected wetlands. We also assessed the relative importance of hydrological connectivity and habitat heterogeneity as drivers of community structure between habitat types. Macroinvertebrate communities from the two habitats were clearly differentiated. Spatial species turnover (β‐diversity) was higher in river-connected wetlands, but endorheic ones supported a higher taxon richness (alpha diversity). Macroinvertebrate community dissimilarity between wetlands was largely determined by turnover, rather than by nestedness. Hydrological connectivity was positively associated with electric conductivity and negatively with nutrient concentrations in the river-connected pools. In addition, the river facilitated fish dispersal which likely excluded predation-sensitive taxa such as the large branchiopod crustaceans Streptocephalus bourquinii, Streptocephalus wirminghausi. Indicator species analysis revealed no specific fauna unique to river-connected wetlands. This study illustrates that land management schemes that aim to preserve temporary wetland biodiversity should strive to include both endorheic and river-connected wetlands to support high regional biodiversity, potentially with a priority for the more diverse endorheic systems.