Aims.We investigate the long gamma-ray burst (GRB) 140629A through multiwavelength observations to derive the properties of the dominant jet and its host galaxy.Methods.The afterglow and host galaxy observations were taken in the optical (Swift/UVOT and various facilities worldwide), infrared (Spitzer), and X-rays (Swift/XRT) between 40 s and 3 yr after the burst trigger.Results.Polarisation observations by the MASTER telescope indicate that this burst is weakly polarised. The optical spectrum contains absorption features, from which we confirm the redshift of the GRB as originating atz = 2.276 ± 0.001. We performed spectral fitting of the X-rays to optical afterglow data and find there is no strong spectral evolution. We determine the hydrogen column densityNHto be 7.2 × 1021cm−2along the line of sight. The afterglow in this burst can be explained by a blast wave jet with a long-lasting central engine expanding into a uniform medium in the slow cooling regime. At the end of energy injection, a normal decay phase is observed in both the optical and X-ray bands. An achromatic jet break is also found in the afterglow light curves ∼0.4 d after trigger. We fit the multiwavelength data simultaneously with a model based on a numerical simulation and find that the observations can be explained by a narrow uniform jet in a dense environment with an opening angle of 6.7° viewed 3.8° off-axis, which released a total energy of 1.4 × 1054erg. Using the redshift and opening angle, we find GRB 140629A follows both the Ghirlanda and Amati relations. From the peak time of the light curve, identified as the onset of the forward shock (181s after trigger), the initial Lorentz factor (Γ0) is constrained in the range 82–118. Fitting the host galaxy photometry, we find the host to be a low mass, star-forming galaxy with a star formation rate of log (SFR) 1.1+0.9−0.4M⊙yr−1. We obtain a value of the neutral hydrogen density by fitting the optical spectrum, logNHI = 21.0 ± 0.3, classifying this host as a damped Lyman-alpha. High ionisation lines (N V, Si IV) are also detected in the spectrum.