With the number of easily accessible ores depleting, alternate primary and secondary sources are required to meet the increasing demand of economically important metals. Whilst highly abundant, these materials are of lower grade with respect to traditional ores, thus highly selective and sustainable metal extraction technologies are needed to reduce processing costs. Here, we investigated the metal leaching potential of biogenic ammonia produced by a ureolytic strain of Lysinibacillus sphaericus on eight primary and secondary materials, comprised of mining and metallurgical residues, sludges and automotive shredder residues (ASR). For the majority of materials, moderate to high yields (30–70%) and very high selectivity (>97% against iron) of copper and zinc were obtained with 1 mol L−1 total ammonia. Optimal leaching was achieved and further refined for the ASR in a two-step indirect leaching system with biogenic ammonia. Copper leaching was the result of local corrosion and differences in leaching against the synthetic (NH4)2CO3 control could be accounted for by pH shifts from microbial metabolism, subsequently altering free NH3 required for coordination. These results provide important findings for future sustainable metal recovery technologies from secondary materials.