The physical properties of lightly doped semiconductors are well described by electronic band-structure calculations and impurity energy levels 1. Such properties form the basis of present-day semiconductor technology. If the doping concentration n exceeds a critical value n c, the system passes through an insulator-to-metal transition and exhibits metallic behaviour; this is widely accepted to occur as a consequence of the impurity levels merging to form energy bands2. However, the electronic structure of semiconductors doped beyond nc have not been explored in detail. Therefore, the recent observation of superconductivity emerging near the insulator-to-metal transition3 in heavily boron-doped diamond4,5 has stimulated a discussion on the fundamental origin of the metallic states responsible for the superconductivity. Two approaches have been adopted for describing this metallic state: the introduction of charge carriers into either the impurity bands6 or the intrinsic diamond bands7-9. Here we show experimentally that the doping-dependent occupied electronic structures are consistent with the diamond bands, indicating that holes in the diamond bands play an essential part in determining the metallic nature of the heavily boron-doped diamond superconductor. This supports the diamond band approach and related predictions, including the possibility of achieving dopant-induced superconductivity in silicon and germanium7. It should also provide a foundation for the possible development of diamond-based devices10.