Earth's mantle transition zone (MTZ) is characterized by several sharp increases in seismic wave speed between ~300 km and ~850 km depth. These seismic discontinuities are generally attributed to solid-state phase transitions that lead to density and viscosity increases, which could cause a barrier to convection by segregating thermally and chemically heterogeneous material. This Review discusses insights into the role of MTZ compositional heterogeneity in mantle convection, derived from the joint constraints of MTZ discontinuity-reflected, discontinuity-refracted and discontinuity-transmitted seismic waves and thermodynamic and convection models. Growing seismic data sets and advances in analysis techniques show that the topography of these discontinuities mainly reflects variations in mantle temperature and, hence, present-day mantle flow. However, the discordant behaviour of the 410 km and 660 km discontinuities shows that the thermal structure is not vertically coherent across the MTZ in many areas, indicating that the MTZ delays the convective transport of cold material from above and hot material from below. Variable reflectivity of the MTZ discontinuity provides evidence of lateral and vertical heterogeneity in major element chemistry and volatile content. Seismic results are consistent with whole-mantle mechanical mixing of tectonic plates, with segregated material accumulating in the MTZ over multiple mantle convection cycles. Phase transitions in the mantle transition zone could affect material and heat exchange between the upper and lower mantle. This Review discusses how compositional heterogeneity affects mantle convection based on seismic observations, plausible mantle compositions and model predictions.