Joining of dissimilar light metals by friction stir welding (FSW) is of interest to reduce weight and fuel consumption in the transport sector. Such coupled metals may need protective surface treatments, e.g. against wear or corrosion, for some applications. In this work, the formation of plasma electrolytic oxidation (PEO) coatings in a silicate-based electrolyte for corrosion protection of FSW AZ31B magnesium alloy-titanium joints has been studied. The joints, if unprotected, may be susceptible to severe galvanic corrosion in chloride-containing environments. The coatings were characterized by scanning electron microscopy, energy-dispersive spectroscopy and X-ray diffraction. Mg2SiO4 and MgO were identified in the coating on the AZ31B alloy and rutile and anatase on the titanium. Immersion of the joints in 3.5 wt% sodium chloride solution for 24 h resulted in severe corrosion of the AZ31B alloy in an uncoated joint; in contrast, corrosion of the AZ31B alloy was localized following PEO owing to the barrier protection provided by the coating. Corrosion of the titanium was negligible. The severe corrosion of the unprotected AZ31B alloy led to precipitation of a large amount of Mg(OH)2 from the sodium chloride solution by the end of the test. The weight of precipitate was reduced by a factor of ≈8 by the application of the PEO coating.