Planet formation occurs around a wide range of stellar masses and stellar system architectures. An improved understanding of the formation process can be achieved by studying it across the full parameter space, particularly toward 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 mass until a turnover point at 1.9 solar masses, above which the frequency rapidly decreases. This could potentially imply that planet formation is impeded around more massive stars, and that giant planets around stars exceeding 3 solar masses 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-10 solar mass 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 ~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 mechanism, but might have formed elsewhere and arrived to its present location through dynamical interactions, or might have formed via gravitational instability.