Measurement-device-independent quantum key distribution (MDI-QKD), based on two-photon interference, is immune to all attacks against the detection system and allows a QKD network with untrusted relays. Since the MDI-QKD protocol was proposed, fibre-based implementations have been rapidly developed towards longer distance, higher key rates, and network verification. However, owing to the effect of atmospheric turbulence, MDI-QKD over free-space channel remains experimentally challenging. Here, by developing the robust adaptive optics system, high precision time synchronization and frequency locking between independent photon sources located far apart, we realised the first free-space MDI-QKD over a 19.2-km urban atmospheric channel, which well exceeds the effective atmospheric thickness. Our experiment takes the first step towards satellite-based MDI-QKD. Moreover, the technology developed here opens the way to quantum experiments in free space involving long-distance interference of independent single photons.