The influence of static disorder on the optical properties of microcavity-embedded quantum wells is studied by means of a microscopic model. Both the exciton-photon coupling and the exciton-disorder interaction are treated nonperturbatively. Despite the nonconservation of the in-plane momentum due to disorder, the Rabi splitting is still present. Moreover, the lower polariton is subject to motional narrowing of the spectral response, while for the upper one this effect is less important. This result shows very good agreement with recently observed spectra in high-quality samples.