The capability of generating two intense, femtosecond x-ray pulses with a controlled time delay opens the possibility of performing time-resolved experiments for x-ray-induced phenomena. We have applied this capability to study the photoinduced dynamics in diatomic molecules. In molecules composed of low-Z elements, K-shell ionization creates a core-hole state in which the main decay mode is an Auger process involving two electrons in the valence shell. After Auger decay, the nuclear wave packets of the transient two-valence-hole states continue evolving on the femtosecond time scale, leading either to separated atomic ions or long-lived quasibound states. By using an x-ray pump and an x-ray probe pulse tuned above the K-shell ionization threshold of the nitrogen molecule, we are able to observe ion dissociation in progress by measuring the time-dependent kinetic energy releases of different breakup channels. We simulated the measurements on N 2 with a molecular dynamics model that accounts for K-shell ionization, Auger decay, and the time evolution of the nuclear wave packets. In addition to explaining the time-dependent feature in the measured kinetic energy release distributions from the dissociative states, the simulation also reveals the contributions of quasibound states.