The process and mechanism of heavy metal flocculation with extracellular polymeric substances (EPS) secreted by microorganisms, are crucial to their fate in natural environment, wastewater treatment and soil bioremedi-ation applications. However, the structural features of EPS and the relationship between these features and the flocculation process and mechanism remain unclear. In the present study, structural features of the microbial product poly-gamma-glutamic acid (gamma-PGA) complexed with the heavy metal ions Pb2+ and Cu2+ were characterized and the evolution of these features was identified as having a key role in the flocculation process and mechanism. The secondary structure of the gamma-PGA-Pb complex changed significantly, while that of the gamma-PGA-Cu complex was only slightly altered. The significant structural change in gamma-PGA-Pb was found to be responsible for the combi-nation of residual COOH and Pb2+, promoting the bridging of inter-colloids and faster growth of hydrodynamic diameter. If the conformation changed sufficiently, such as with the gamma-PGA-Pb complex in the pH range 4.6-6.2, pH had no impact on the conversion ratio. The unchanged structure of gamma-PGA-Cu prevented the flocculation process, although the coordination mode of gamma-PGA-Cu resulted in a higher biosorption capacity. This in-depth molecular-level study provides insight into the gamma-PGA flocculation mechanism, promoting the use of gamma-PGA and gamma-PGA producing microorganisms for application in various remediation strategies.