At the 2012 Summer Olympics in London, Dwyer swam his first race in the men's 400-meter freestyle. In the heats of the 400-meter freestyle, Dwyer achieved a personal best of 3:46.24 (with his prior being 3:47.83) to qualify for the final. In the final of the 400-meter freestyle, Dwyer placed fifth with a time of 3:46.39, slightly slower than the time he posted in the heats. In his second and last event, the 4×200-meter freestyle relay, Dwyer earned a gold medal when the U.S. team placed first in the final with a time of 6:59.70. Teaming with Ryan Lochte, Ricky Berens and Michael Phelps, Dwyer swam the second leg in a time of 1:45.23.