The peat-forming wetland forests of Amazonia are characterized by high below-carbon stocks and supply fruit, fibres and timber to local communities. Predicting the future of these ecosystem services requires understanding how hydrological conditions are related to tree species composition and the presence, or absence, of peat. Here, we use continuous measurements of water table depth over 2.5 years and manual measurements of pore-water pH and electrical conductivity to understand the ecohydrological controls of these variables across the large peatland complex in northern Peruvian Amazonia. Measurements were taken in permanent forest plots in four palm swamps, four seasonally flooded forests and four peatland pole forests. All trees ≥10 cm diameter were also measured and identified in the plots to assess floristic composition. Peat occurs in eight of these twelve sites; three seasonally flooded forests and one palm swamp are not associated with peat. Variation in tree species composition among forest types was linked to high flood levels (maximum flooding height) and pH: seasonally flooded forests experience high flood levels (up to 3.66 m from the ground surface) and have high pH values (6–7), palm swamps have intermediate flood levels (up to 1.34 m) and peatland pole forests experience shallow flooding (up to 0.28 m) and have low pH (4). In contrast, the presence of peat was linked to variation in maximum water table depth (i.e. the depth to which the water table drops below the ground surface). Surface peat is found in all forest types where maximum water table depth does not fall >0.55 m below the ground surface at any time. Peat formation and variation in tree species composition therefore have different ecohydrological controls. Predicted increases in the frequency and strength of flooding events may alter patterns of tree species composition, whereas increases in drought severity and declines in minimum river levels may pose a greater risk to the belowground carbon stores of these peatland ecosystems.