Planet formation occurs around a wide range of stellar masses and stellar system architectures1. An improved understanding of the formation process can be achieved by studying it across the full parameter space, particularly towards the extremes. Earlier studies of planets in close-in orbits around high-mass stars have revealed an increase in giant planet frequency with increasing stellar mass2 until a turnover point at 1.9 solar masses (M⊙), above which the frequency rapidly decreases3. This could potentially imply that planet formation is impeded around more massive stars, and that giant planets around stars exceeding 3 M⊙ may be rare or non-existent. However, the methods used to detect planets in small orbits are insensitive to planets in wide orbits. Here we demonstrate the existence of a planet at 560 times the Sun–Earth distance from the 6- to 10-M⊙ binary b Centauri through direct imaging. The planet-to-star mass ratio of 0.10–0.17% is similar to the Jupiter–Sun ratio, but the separation of the detected planet is about 100 times wider than that of Jupiter. Our results show that planets can reside in much more massive stellar systems than what would be expected from extrapolation of previous results. The planet is unlikely to have formed in situ through the conventional core accretion mechanism4, but might have formed elsewhere and arrived to its present location through dynamical interactions, or might have formed via gravitational instability.