Availability of cadmium (Cd) and nitrate and their transfer to green leafy vegetables is highly dependent on physical, chemical and biochemical conditions of the soil. The phenotypic characteristics, accumulation of hazardous materials and rhizosphere properties of two ecotypes of water spinach in response to water stress were investigated. Flooding significantly enhanced plant growth and decreased Cd and nitrate concentrations in the shoot and root of both ecotypes of water spinach. Flooding extensively changed the physicochemical properties and biological processes in the rhizosphere, including increased pH and activities of urease and acid phosphatase, and decreased availability of Cd and nitrate and activity of nitrate reductase. Furthermore, flooding increased rhizosphere bacteria community diversity (including richness and evenness) and changed their community structure. Denitrifying bacteria (Clostridiales, Azoarcus and Pseudomonas), toxic metal resistant microorganisms (Rhodosporillaceae, Rhizobiales and Geobacter) were enriched in the rhizosphere under flooding conditions, and the plant growth-promoting taxa (Sphingomonadaceae) were preferentially colonized in the high accumulator (HA) rhizosphere region. These results indicated that flooding treatments result in biochemical and microbiological changes in soil, especially in the rhizosphere and reduced the availability of Cd and nitrate to plants, thus decreasing their uptake by water spinach. It is, therefore, possible to promote crop growth and reduce the accumulation of hazardous materials in vegetable crops like water spinach by controlling soil moisture conditions.