The discovery that many trans‐Neptunian objects exist in pairs, or binaries, is proving invaluable for shedding light on the formation, evolution and structure of the outer Solar system. Based on recent systematic searches it has been estimated that up to 10 per cent of Kuiper‐belt objects might be binaries. However, all examples discovered to date are unusual, as compared with near‐Earth and main‐belt asteroid binaries, for their mass ratios of the order of unity and their large, eccentric orbits. In this article we propose a common dynamical origin for these compositional and orbital properties based on four‐body simulations in the Hill approximation. Our calculations suggest that binaries are produced through the following chain of events. Initially, long‐lived quasi‐bound binaries form by two bodies getting entangled in thin layers of dynamical chaos produced by solar tides within the Hill sphere. Next, energy transfer through gravitational scattering with a low‐mass intruder nudges the binary into a nearby non‐chaotic, stable zone of phase space. Finally, the binary hardens (loses energy) through a series of relatively gentle gravitational scattering encounters with further intruders. This produces binary orbits that are well fitted by Kepler ellipses. Dynamically, the overall process is strongly favoured if the original quasi‐bound binary contains comparable masses. We propose a simplified model of chaotic scattering to explain these results. Our findings suggest that the observed preference for roughly equal‐mass ratio binaries is probably a real effect; that is, it is not primarily due to an observational bias for widely separated, comparably bright objects. Nevertheless, we predict that a sizeable population of very unequal‐mass Kuiper‐belt binaries is probably awaiting discovery.