The cosmic evolution of the chemical elements from the Big Bang to the present time is driven by nuclear fusion reactions inside stars and stellar explosions. A cycle of matter recurrently re-processes metal-enriched stellar ejecta into the next generation of stars. The study of cosmic nucleosynthesis and of this matter cycle requires the understanding of the physics of nuclear reactions, of the conditions at which the nuclear reactions are activated inside the stars and stellar explosions, of the stellar ejection mechanisms through winds and explosions, and of the transport of the ejecta towards the next cycle, from hot plasma to cold, star-forming gas. Due to the long timescales of stellar evolution, and because of the infrequent occurrence of stellar explosions, observational studies are challenging. Due to their radioactive lifetime of million years, the 26Al and 60Fe isotopes are suitable to characterise simultaneously the processes of nuclear fusion reactions and of interstellar transport. We describe and discuss the nuclear reactions involved in the production and destruction of 26Al and 60Fe, the key characteristics of the stellar sites of their nucleosynthesis and their interstellar journey after ejection from the nucleosynthesis sites. We connect the theoretical astrophysical aspects to the variety of astronomical messengers, from stardust and cosmic-ray composition measurements, through observation of gamma rays produced by radioactivity, to material deposited in deep-sea ocean crusts and to the inferred composition of the first solids that have formed in the Solar System. We show that considering measurements of the isotopic ratio of 26Al to 60Fe eliminate some of the unknowns when interpreting astronomical results, and discuss the lessons learned from these two isotopes on cosmic chemical evolution.