Planetary nebulae are the ionized ejected envelopes surrounding the remnant cores of dying stars. Theory predicts that main-sequence stars of one to about eight solar masses may eventually form planetary nebulae. Until now, this has not been confirmed at the higher end of the mass range. Here we report that the planetary nebula BMP J1613-5406 is associated with the Galactic star cluster NGC 6067. Stars evolving off the main sequence of this cluster have a mass of around five solar masses. Our confidence in the association between the planetary nebula and the cluster comes from their tightly consistent radial velocities in a sightline with a steep velocity-distance gradient, common distances, and reddening and location of the planetary nebula within the cluster boundary. This is an unprecedented example of a planetary nebula whose progenitor star mass approaches the theoretical lower limit of core-collapse supernova formation. This finding provides observational evidence supporting theoretical predictions that stars of five solar masses and more can form planetary nebulae.