We report on the pressure-driven superconductor-insulator transition in heavily boron-doped nanodiamond films. By systematically increasing the pressure, we suppress the Josephson coupling between the superconducting nanodiamond grains. The diminished intergrain coupling gives rise to an overall insulating state in the films, which is interpreted in the framework of a parallel-series circuit model to be the result of bosonic insulators with preserved localized intragrain superconducting order parameters. Our investigation opens up perspectives for the application of high pressure in research on quantum confinement and coherence. Our data unveil the percolative nature of the electrical transport in nanodiamond films, and highlight the essential role of grain boundaries in determining the electronic properties of this material.