While advances in biologging have revealed many spectacular animal migrations, it remains poorly understood how young animals learn to migrate. Even in social species, it is unclear how migratory skills are transmitted from one generation to another and what implications this may have. Here we show that in Caspian terns Hydroprogne caspia family groups, genetic and foster male parents carry the main responsibility for migrating with young. During migration, young birds stayed close to an adult at all times, with the bond dissipating on the wintering grounds. Solo-migrating adults migrated faster than did adults accompanying young. Four young that lost contact with their parent at an early stage of migration all died. During their first solo migration, subadult terns remained faithful to routes they took with their parents as young. Our results provide evidence for cultural inheritance of migration knowledge in a long-distance bird migrant and show that sex-biased (allo)parental care en route shapes migration through social learning.