The surrounding environment has significant consequences for the structural and functional properties of membrane proteins. While native structure and function can be reconstituted in lipid bilayer membranes, the detergents used for protein solubilization are not always compatible with biological activity and, hence, not always appropriate for direct detection of ligand binding by NMR spectroscopy. Here we describe how the sample environment affects the activity of the outer membrane protein Ail (attachment invasion locus) from Yersinia pestis. Although Ail adopts the correct β-barrel fold in micelles, the high detergent concentrations required for NMR structural studies are not compatible with the ligand binding functionality of the protein. We also describe preparations of Ail embedded in phospholipid bilayer nanodiscs, optimized for NMR studies and ligand binding activity assays. Ail in nanodiscs is capable of binding its human ligand fibronectin and also yields high quality NMR spectra that reflect the proper fold. Binding activity assays, developed to be performed directly with the NMR samples, show that ligand binding involves the extracellular loops of Ail. The data show that even when detergent micelles support the protein fold, detergents can interfere with activity in subtle ways.