This study reports the first weak-lensing detection of a large-scale filament funneling matter onto the core of the massive galaxy cluster MACSJ0717.5+3745. The analysis is based on Hubble Space Telescope images covering an area of 10x20 arcmin^2 around the cluster. A weak-lensing mass reconstruction detects the filament within 3 sigma and measures its projected length as ~4.5 h^-1 Mpc and mean density as (2.92±0.66)×10^8 h74 M⊙ kpc^-2. Assuming constraints on the filament's geometry based on galaxy velocities, the three-dimensional length is estimated to be 18 h^-1 M