Context. Long gamma-ray bursts (GRBs) give us the chance to study both their extreme physics and the star-forming galaxies in which they form. Aims. GRB 100418A, at a redshift of z = 0.6239, had a bright optical and radio afterglow, and a luminous star-forming host galaxy. This allowed us to study the radiation of the explosion as well as the interstellar medium of the host both in absorption and emission. Methods. We collected photometric data from radio to X-ray wavelengths to study the evolution of the afterglow and the contribution of a possible supernova (SN) and three X-shooter spectra obtained during the first 60 h. Results. The light curve shows a very fast optical rebrightening, with an amplitude of ∼3 magnitudes, starting 2.4 h after the GRB onset. This cannot be explained by a standard external shock model and requires other contributions, such as late central-engine activity. Two weeks after the burst we detect an excess in the light curve consistent with a SN with peak absolute magnitude MV = −18.5 mag, among the faintest GRB-SNe detected to date. The host galaxy shows two components in emission, with velocities differing by 130 km s−1, but otherwise having similar properties. While some absorption and emission components coincide, the absorbing gas spans much higher velocities, indicating the presence of gas beyond the star-forming regions. The host has a star formation rate of SFR = 12.2 M⊙ yr−1, a metallicity of 12 + log(O/H) = 8.55, and a mass of 1.6 × 109 M⊙. Conclusions. GRB 100418A is a member of a class of afterglow light curves which show a steep rebrightening in the optical during the first day, which cannot be explained by traditional models. Its very faint associated SN shows that GRB-SNe can have a larger dispersion in luminosities than previously seen. Furthermore, we have obtained a complete view of the host of GRB 100418A owing to its spectrum, which contains a remarkable number of both emission and absorption lines.