We report the detection of high-energy gamma-ray signal towards the young star-forming region, W40. Using 10-year Pass 8 data from the Fermi Large Area Telescope (Fermi-LAT), we extracted an extended gamma-ray excess region with a significance of about 18sigma. The radiation has a spectrum with a photon index of 2.49 +/- 0.01. The spatial correlation with the ionized gas content favors the hadronic origin of the gamma-ray emission. The total cosmic-ray (CR) proton energy in the gamma-ray production region is estimated to be the order of 10^47 erg. However, this could be a small fraction of the total energy released in cosmic rays (CRs) by local accelerators, presumably by massive stars, over the lifetime of the system. If so, W40, together with earlier detections of gamma-rays from Cygnus cocoon, Westerlund 1, Westerlund 2, NGC 3603, and 30 Dor C, supports the hypothesis that young star clusters are effective CR factories. The unique aspect of this result is that the gamma-ray emission is detected, for the first time, from a stellar cluster itself, rather than from the surrounding cocoons.