Macroscopic mechanical objects and electromagnetic degrees of freedom can couple to each other through radiation pressure. Optomechanical systems in which this coupling is sufficiently strong are predicted to show quantum effects and are a topic of considerable interest. Devices in this regime would offer new types of control over the quantum state of both light and matter (1, 2, 3, 4), and would provide a new arena in which to explore the boundary between quantum and classical physics (5, 6, 7). Experiments so far have achieved sufficient optomechanical coupling to laser-cool mechanical devices (8, 9, 10, 11, 12), but have not yet reached the quantum regime. The outstanding technical challenge in this field is integrating sensitive micromechanical elements (which must be small, light and flexible) into high-finesse cavities (which are typically rigid and massive) without compromising the mechanical or optical properties of either. A second, and more fundamental, challenge is to read out the mechanical element’s energy eigenstate. Displacement measurements (no matter how sensitive) cannot determine an oscillator’s energy eigenstate (13), and measurements coupling to quantities other than displacement (14, 15, 16) have been difficult to realize in practice. Here we present an optomechanical system that has the potential to resolve both of these challenges. We demonstrate a cavity which is detuned by the motion of a 50 nm-thick dielectric membrane placed between two macroscopic, rigid, high-finesse mirrors. This approach segregates optical and mechanical functionality to physically distinct structures and avoids compromising either. It also allows for direct measurement of the square of the membrane’s displacement, and thus in principle the membrane’s energy eigenstate. We estimate that it should be practical to use this scheme to observe quantum jumps of a mechanical system, an important goal in the field of quantum measurement.