Silicon-based materials have widespread application as biophysical tools and biomedical devices. Here we introduce a biocompatible and degradable mesostructured form of silicon with multi-scale structural and chemical heterogeneities. The material was synthesized using mesoporous silica as a template through a chemical vapour deposition process. It has an amorphous atomic structure, an ordered nanowire-based framework and random submicrometre voids, and shows an average Young's modulus that is 2-3 orders of magnitude smaller than that of single-crystalline silicon. In addition, we used the heterogeneous silicon mesostructures to design a lipid-bilayer-supported bioelectric interface that is remotely controlled and temporally transient, and that permits non-genetic and subcellular optical modulation of the electrophysiology dynamics in single dorsal root ganglia neurons. Our findings suggest that the biomimetic expansion of silicon into heterogeneous and deformable forms can open up opportunities in extracellular biomaterial or bioelectric systems.