We developed the EcoLion, which collects heavy metals from the environment, aimed at cleaning up heavy-metal pollution as well as for the mining of valuable metals for industrial applications. A bacterial micro-compartment (BMC) was engineered into our E. coli micromachine to act as a tank to accumulate heavy metals. Heavy metal ions, such as Zn2+, Cd2+, and As2+, that are taken up by the cell will be trapped inside the tank by a metallothionein fused to a BMC-localizing tag. Using BMC in such a way will be very advantageous as it may achieve the accumulation of high concentrations of heavy metals in one place. The EcoLion that has stored heavy metals will be conveniently collected by light using phototaxis or self-aggregation. This EcoLion may ultimately be applied for collecting a number of different toxic or valuable molecules by using specific target-binding peptides or proteins.