Abstract We report the detection of high-energy gamma-ray emission towards the G305 star-forming region. Using almost 15 years of observation data from Fermi Large Area Telescope, we detected an extended gamma-ray source in this region with a significance of ∼13σ. The gamma-ray radiation reveals a clear pion-bump feature and can be fitted with the power law parent proton spectrum with an index of −2.5. The total cosmic ray (CR) proton energy in the gamma-ray production region is estimated to be the order of $10^{49}\ \rm erg$. We further derived the CR radial distribution from both the gamma-ray emission and gas distribution and found it roughly obeys the 1/r type profile, though a constant profile is not ruled out. This is consistent with other similar systems and expected from the continuous injection of CRs by the central powerful young massive star cluster Danks 1 or Danks 2 in this region. Together with former detections of similar gamma-ray structures, such as Cygnus cocoon, Westerlund 1, Westerlund 2, NGC 3603, and W40, the detection supports the hypothesis that young massive star clusters are CR accelerators.