The γ-ray emission from the W51 complex is widely acknowledged to be attributed to the interaction between the cosmic rays (CRs) accelerated by the shock of supernova remnant (SNR) W51C and the dense molecular clouds in the adjacent star-forming region, W51B. However, the maximum acceleration capability of W51C for CRs remains elusive. Based on observations conducted with the Large High Altitude Air Shower Observatory (LHAASO), we report a significant detection of γ rays emanating from the W51 complex, with energies from 2 to 200 TeV. The LHAASO measurements, for the first time, extend the γ-ray emission from the W51 complex beyond 100 TeV and reveal a significant spectrum bending at tens of TeV. By combining the "π