Biological membranes compartmentalize and define physical borders of cells. They are crowded with membrane proteins that fulfill diverse crucial functions. About one-third of all genes in organisms code for, and the majority of drugs target, membrane proteins. To combine structure and function analysis of membrane proteins, we designed a two-chamber atomic force microscopy (AFM) setup that allows investigation of membranes spanned over nanowells, therefore separating two aqueous chambers. We imaged nonsupported surface layers (S layers) of Corynebacterium glutamicum at sufficient resolution to delineate a 15 A-wide protein pore. We probed the elastic and yield moduli of nonsupported membranes, giving access to the lateral interaction energy between proteins. We combined AFM and fluorescence microscopy to demonstrate the functionality of proteins in the setup by documenting proton pumping by Halobacterium salinarium purple membranes.