At the 2012 Summer Olympics in London, Agnel won a total of three medals: two golds and one silver. In his first event, Agnel anchored a come-from-behind effort in the 4×100-meter freestyle relay to win gold with Amaury Leveaux, Fabien Gilot, and Clément Lefert. Diving in with a 0.55 s deficit, Agnel was able to cut that down to a 0.30 s deficit at the 350-meter mark. In the last 50-meters, Agnel pulled ahead of American Ryan Lochte and France won with a time of 3:09:93 to the United States' time of 3:10:38. Agnel swam the fastest split time of the entire field with a time of 46.74, the only individual to break 47 seconds. The next day, Agnel won his second gold medal in the 200-meter freestyle with a time of 1:43.14, the fastest in French swimming history and 1.79 seconds ahead of silver medal winners Sun Yang and Park Tae-hwan. In the final, Agnel led from start-to-finish, recording a time of 50.64 in the first 100-meters and 52.50 in the last 100-meters. His time of 25.98 for the last 50-meters was by far the fastest in the field. Agnel won his final medal, a silver, in the 4×200-meter freestyle relay behind the United States with Amaury Leveaux, Grégory Mallet, and Clément Lefert. He had the fastest split time of the field in the final with a time of 1:43.24 as the anchor leg. In his final event, the 100-meter freestyle, Agnel finished fourth in a personal best time of 47.84, 0.04 s of a second outside the medals. The European Swimming Federation named Agnel male European swimmer of the year 2012.