Starting from a Su-Schrieffer-Heeger-like model inferred from first-principles simulations, we show that the metal-insulator transition in In/Si(111) is a first-order grand canonical Peierls transition in which the substrate acts as an electron reservoir for the wires. This model explains naturally the existence of a metastable metallic phase over a wide temperature range below the critical temperature and the sensitivity of the transition to doping. Raman scattering experiments corroborate the softening of the two Peierls deformation modes close to the transition.