We consider the non-equilibrium dynamics of the entanglement entropy of a one-dimensional quantum gas of hard-core particles, initially confined in a box potential at zero temperature. At t = 0 the right edge of the box is suddenly released and the system is let free to expand. During this expansion, the initially correlated region propagates with a non-homogeneous profile, leading to the growth of entanglement entropy. This setting is investigated in the hydrodynamic regime, with tools stemming from semi-classical Wigner function approach and with recent developments of quantum fluctuating hydrodynamics. Within this framework, the entanglement entropy can be associated to a correlation function of chiral twist-fields of the conformal field theory that lives along the Fermi contour and it can be exactly determined. Our predictions for the entanglement evolution are found in agreement with and generalize previous results in literature based on numerical calculations and heuristic arguments.