While the role of microorganisms as main drivers of metal mobility and mineral formation under Earth surface conditions is now widely accepted, the formation of secondary gold (Au) is commonly attributed to abiotic processes. Here we report that the biomineralization of Au nanoparticles in the metallophillic bacterium Cupriavidus metallidurans CH34 is the result of Au-regulated gene expression leading to the energy-dependent reductive precipitation of toxic Au(III)-complexes. C. metallidurans, which forms biofilms on Au grains, rapidly accumulates Au(III)-complexes from solution. Bulk and microbeam synchrotron X-ray analyses revealed that cellular Au accumulation is coupled to the formation of Au(I)-S complexes. This process promotes Au toxicity and C. metallidurans reacts by inducing oxidative stress and metal resistances gene clusters ( including a Au-specific operon) to promote cellular defense. As a result, Au detoxification is mediated by a combination of efflux, reduction, and possibly methylation of Au-complexes, leading to the formation of Au(I)-C-compounds and nanoparticulate Au(0). Similar particles were observed in bacterial biofilms on Au grains, suggesting that bacteria actively contribute to the formation of Au grains in surface environments. The recognition of specific genetic responses to Au opens the way for the development of bioexploration and bioprocessing tools.