Abstract Magnetic rope is a helical structure existing ubiquitously in astrophysical and space plasmas. Such structure has been conventionally known to accelerate electrons, convert energy, and play key roles in driving solar eruptions. Here, in contrast to the conventional concept, we report that the magnetic rope can divert electrons efficiently in its axial direction via the gradient drift and curvature drift—two fundamental processes in plasma physics—when electrons meet the edge of the rope, by analyzing spacecraft measurements in the Earth’s magnetotail combined with numerical simulations. Such electron diversion only occurs at high‐energy channels but not at low‐energy channels, demonstrating that the magnetic rope is an electron selector. Inspired by this new finding, we conceptually design a medical imaging device, which can diagnose the internal organs of a patient during medical examination. These results provide a new perspective for understanding the plasma dynamics in space and demonstrate how fundamental astrophysical processes are applied to an interdisciplinary subject to advance the development of the modern medical imaging technology.