We present a scheme to remotely prepare a photon-photon entangled state via entanglement swapping in cavity QED. Using two successive processes of appropriate atom-cavity interaction and subsequent measurements, we obtain the entangled state with certain probability.