Relativistic neutron-loaded outflows in gamma-ray bursts are studied at their early stages, before deceleration by a surrounding medium. The outflow has four components: radiation, electrons, protons and neutrons. The components interact with each other and exchange energy as the outflow expands. The presence of neutrons significantly changes the outflow evolution. Before neutrons decouple from protons, friction between the two components increases their temperatures by many orders of magnitude. After the decoupling, the gradual neutron decay inside the outflow has a drag effect on the protons and reduces their final Lorentz factor. In inhomogenous outflows, this drag can reduce the Lorentz-factor contrast and affect the development and strength of internal shocks.