Swimming at the 2012 Summer Olympics – Men's 4 × 100 metre medley relay

The men's 4 × 100 metre medley relay event at the 2012 Summer Olympics took place on 3–4 August at the London Aquatics Centre in London, United Kingdom.

In the final race of his unprecedented career before a temporary retirement, Michael Phelps topped off with his eighteenth gold and twenty-second overall to officially become the most decorated Olympian of all time, as the U.S. men's team posted a textile best to defend the Olympic medley relay title since the event's inception in 1960. Trading the lead with Japan throughout the race, the solid foursome of Matt Grevers (52.58), Brendan Hansen (59.19), Phelps (50.73), and Nathan Adrian (46.85) put together a historic ending with a blazing fast finish in 3:29.35, just a fingertip short of their 2008 Olympic record during the high-tech bodysuit era.

Japan's Ryosuke Irie (52.92), Kosuke Kitajima (58.64), Takeshi Matsuda (51.20), and Takuro Fujii (48.50) held on an arduous challenge with the Americans throughout the race before Adrian pulled off a lead in the freestyle leg, leaving them with a silver in 3:31.26. Meanwhile, James Magnussen produced a magnificent freestyle anchor of 47.22 to deliver the Aussie foursome of Hayden Stoeckel (53.71), Christian Sprenger (59.05), and Matt Targett (51.60) a bronze-medal time in 3:31.58.

Great Britain's Liam Tancock (53.40), Michael Jamieson (59.27), Michael Rock (51.74), and Adam Brown (47.91) missed the podium by almost three quarters of a second (0.75) with a fourth-place effort in 3:32.32. Meanwhile, Hungary's László Cseh (53.40, a national-record split), Dániel Gyurta (59.01), Bence Pulai (51.82), and Dominik Kozma (48.79) claimed a fifth spot in 3:33.02 to hold off the agile German foursome of Helge Meeuw (53.78), Christian vom Lehn (1:00.30), and Deibler brothers Steffen (50.91) and Markus (48.07) by four-hundredths of a second, a sixth-place time in 3:33.06. Netherlands (3:33.46) and Canada (3:34.19), anchored by freestyle swimmer and bronze medalist Brent Hayden, rounded out a historic championship finale.

Records
Prior to this competition, the existing world and Olympic records were as follows.