We have determined the filling properties of nanogaps with chemically heterogeneous walls. The quantitative criteria we present allow the prediction of the liquid loading of the nanostructure. They can easily be applied in combination with contact-angle measurements on planar substrates of the nanogap materials. We present an application of the theory to a recently developed nanogap biosensor. Chemical force microscopy (CFM) is employed to characterize the initial silanol properties of the gap. The functionality of the complex surface chemistry of the biosensor is demonstrated by the observation of functionalized nanoparticles in the gap with its resulting characteristic current−voltage relationship.