We compare the magnetic helicity in the 17-18 March 2013 interplanetary coronal mass ejection (ICME) flux-rope at 1 AU and in its solar counterpart. The progenitor coronal mass ejection (CME) erupted on 15 March 2013 from NOAA active region 11692 and associated with an M1.1 flare. We derive the source region reconnection flux using post-eruption arcade (PEA) method (Gopalswamy et al. 2017a) that uses the photospheric magnetogram and the area under the PEA. The geometrical properties of the near-Sun flux rope is obtained by forward-modeling of white-light CME observations. Combining the geometrical properties and the reconnection flux we extract the magnetic properties of the CME flux rope (Gopalswamy et al. 2017b). We derive the magnetic helicity of the flux rope using its magnetic and geometric properties obtained near the Sun and at 1 AU. We use a constant-{alpha} force-free cylindrical flux rope model fit to the in situ observations in order to derive the magnetic and geometric information of the 1-AU ICME. We find a good correspondence in both amplitude and sign of the helicity between the ICME and the CME assuming a semi-circular (half torus) ICME flux rope with a length of {pi} AU. We find that about 83% of the total flux rope helicity at 1 AU is injected by the magnetic reconnection in the low corona. We discuss the effect of assuming flux rope length in the derived value of the magnetic helicity. This study connecting the helicity of magnetic flux ropes through the Sun-Earth system has important implications for the origin of helicity in the interplanetary medium and the topology of ICME flux ropes at 1 AU and hence their space weather consequences.