Oxicams are widely used nonsteroidal anti-inflammatory drugs (NSAIDs), but little is known about the molecular basis of the interaction with their target enzymes, the cyclooxygenases (COX). Isoxicam is a nonselective inhibitor of COX-1 and COX-2 whereas meloxicam displays some selectivity for COX-2. Here we report crystal complexes of COX-2 with isoxicam and meloxicam at 2.0 and 2.45 angstroms, respectively, and a crystal complex of COX-1 with meloxicam at 2.4 angstroms. These structures reveal that the oxicams bind to the active site of COX-2 using a binding pose not seen with other NSAIDs through two highly coordinated water molecules. The 4-hydroxyl group on the thiazine ring partners with Ser-530 via hydrogen bonding, and the heteroatom of the carboxamide ring of the oxicam scaffold interacts with Tyr-385 and Ser-530 through a highly coordinated water molecule. The nitrogen atom of the thiazine and the oxygen atom of the carboxamide bind to Arg-120 and Tyr-355 via another highly ordered water molecule. The rotation of Leu-531 in the structure opens a novel binding pocket, which is not utilized for the binding of other NSAIDs. In addition, a detailed study of meloxicam·COX-2 interactions revealed that mutation of Val-434 to Ile significantly reduces inhibition by meloxicam due to subtle changes around Phe-518, giving rise to the preferential inhibition of COX-2 over COX-1.