We report the first weak-lensing detection of a large-scale filament funneling matter onto the core of the massive galaxy cluster MACSJ0717.5+3745 . Our analysis is based on a mosaic of 18 multi-passband images obtained with the Advanced Camera for Surveys aboard the Hubble Space Telescope , covering an area of \sim 10 \times 20 arcmin ^ { 2 } . We use a weak-lensing pipeline developed for the COSMOS survey , modified for the analysis of galaxy clusters , to produce a weak-lensing catalogue . A mass map is then computed by applying a weak-gravitational-lensing multi-scale reconstruction technique designed to describe irregular mass distributions such as the one investigated here . We test the resulting mass map by comparing the mass distribution inferred for the cluster core with the one derived from strong-lensing constraints and find excellent agreement . Our analysis detects the MACSJ0717.5+3745 filament within the 3Â sigma detection contour of the lensing mass reconstruction , and underlines the importance of filaments for theoretical and numerical models of the mass distribution in the Cosmic Web . We measure the filament ’ s projected length as \sim 4.5 h _ { 74 } ^ { -1 } Mpc , and its mean density as ( 2.92 \pm 0.66 ) \times 10 ^ { 8 } ~ { } h _ { 74 } M _ { \odot } kpc ^ { -2 } . Combined with the redshift distribution of galaxies obtained after an extensive spectroscopic follow-up in the area , we can rule out any projection effect resulting from the chance alignment on the sky of unrelated galaxy group-scale structures . Assuming plausible constraints concerning the structure ’ s geometry based on its galaxy velocity field , we construct a 3D model of the large-scale filament . Within this framework , we derive the three-dimensional length of the filament to be 18Â h _ { 74 } ^ { -1 } Mpc . The filament ’ s deprojected density in terms of the critical density of the Universe is measured as ( 206 \pm 46 ) \times \rho _ { crit } , a value that lies at the very high end of the range predicted by numerical simulations . Finally , we study the distribution of stellar mass in the field of MACSJ0717.5+3749 and , adopting a mean mass-to-light ratio \langle M _ { \ast } / L _ { K } \rangle of 0.73 \pm 0.22 and assuming a Chabrier Initial-Mass Function , measure a stellar mass fraction along the filament of ( 0.9 \pm 0.2 ) % , consistent with previous measurements in the vicinity of massive clusters .