Along ultraslow-spreading ridges, where oceanic tectonic plates drift very slowly apart, conductive cooling is thought to limit mantle melting and melt production has been inferred to be highly discontinuous. Along such spreading centres, long ridge sections without any igneous crust alternate with magmatic sections that host massive volcanoes capable of strong earthquakes. Hence melt supply, lithospheric composition and tectonic structure seem to vary considerably along the axis of the slowest-spreading ridges. However, owing to the lack of seismic data, the lithospheric structure of ultraslow ridges is poorly constrained. Here we describe the structure and accretion modes of two end-member types of oceanic lithosphere using a detailed seismicity survey along 390 kilometres of ultraslow-spreading ridge axis. We observe that amagmatic sections lack shallow seismicity in the upper 15 kilometres of the lithosphere, but unusually contain earthquakes down to depths of 35 kilometres. This observation implies a cold, thick lithosphere, with an upper aseismic zone that probably reflects substantial serpentinization. We find that regions of magmatic lithosphere thin dramatically under volcanic centres, and infer that the resulting topography of the lithosphere-asthenosphere boundary could allow along-axis melt flow, explaining the uneven crustal production at ultraslow-spreading ridges. The seismicity data indicate that alteration in ocean lithosphere may reach far deeper than previously thought, with important implications towards seafloor deformation and fluid circulation.