Deeply buried sandstones in sedimentary basins typically have low porosity due to cementation and compaction. There are several known causes of anomalously high porosity in sandstones, one of which is microquartz coatings on sand grains that seem to inhibit growth of quartz cement. However, there has been no mechanistic understanding of why or how microquartz grows, or why it maintains high porosity in sandstones. Here we have used high-resolution scanning electron microscopy, electron backscattered diffraction, and transmission electron microscopy to study the microquartz-cemented Late Cretaceous Heidelberg Formation, Germany. We have revealed that a nanofilm of amorphous silica (50–100 nm) and a layer of chalcedony are between the detrital grain and microquartz cement. The amorphous silica insulates the detrital quartz grains and prevents syntaxial growth, while microquartz adopts the orientation of the underlying chalcedony with its fast-growth c axis parallel to the grain surface, thus preventing growth into the pore. Now that we know what controls microquartz growth and why it preserves porosity, it can be used to help identify, rank, and appraise deeply buried petroleum accumulations.