Decades ago, γ-ray observatories identified diffuse Galactic emission at 1.809 MeV1–3 originating from β+ decays of an isotope of aluminium, 26Al, that has a mean lifetime of 1.04 million years4. Objects responsible for the production of this radioactive isotope have never been directly identified owing to insufficient angular resolutions and sensitivities of the γ-ray observatories. Here, we report observations of millimetre-wave rotational lines of the isotopologue of aluminium monofluoride that contains the radioactive isotope (26AlF). The emission is observed towards CK Vul, which is thought to be a remnant of a stellar merger5–7. Our constraints on the production of 26Al, combined with the estimates on the merger rate, make it unlikely that objects similar to CK Vul are major producers of Galactic 26Al. However, the observation may be a stepping stone for unambiguous identification of other Galactic sources of 26Al. Moreover, a high content of 26Al in the remnant indicates that, before the merger, the CK Vul system contained at least one solar-mass star that evolved to the red giant branch.