Swimming at the 2020 Summer Olympics – Men's 400 metre freestyle

The men's 400 metre freestyle event at the 2020 Summer Olympics was held in 2021 at the Tokyo Aquatics Centre. It was the event's twenty-seventh consecutive appearance, having been held at every edition since 1904.

Summary
In one of the most stunning upsets in Olympic swimming history, Tunisia's Ahmed Hafnaoui became the lowest-seeded swimmer to win gold since 2004, when Kirsty Coventry won the 200 backstroke as the 21st seed. Entered into the meet ranked 16th with a month-old personal best time of 3:46.16, Hafnaoui dropped almost half a second to qualify for the final in 8th place by just 0.14 s. The youngest swimmer in the final field, the 18 year old Tunisian was third at the 100 m mark, before moving up to second by the 150. Though he was 0.31 seconds behind Australia's Jack McLoughlin at the final turn, Hafnaoui used a blistering final lap to overtake him, recording a winning time of 3:43.36 - nearly three seconds faster than his entry time. By winning the title, Hafnaoui became the first African Olympic champion in this event and the second Tunisian swimmer to win gold, emulating the feats of his idol Oussama Mellouli.

Meanwhile McLoughlin, swimming out in lane 2, moved to the lead at the halfway mark before maintaining his position until the final turn. However, he could not fend off the late charge from Hafnaoui, settling for silver in 3:43.52. Swimming alongside Hafnaoui, the U.S.' Kieran Smith unleashed the second fastest closing split in the field to win the nation's first medal in this event since Peter Vanderkaay in 2012. While Austria's Felix Auboeck was third at the final turn, he narrowly missed the podium to place fourth in a tie with Germany Henning Mühlleitner who was the fastest finisher in the field.

The only defending medallist in the field, Italy's 2016 Bronze medallist Gabriele Detti was more than a second off his national record, clocking a 3:44.88 to take fifth. The only swimmer in the field to dip under the 3:43 barrier, Australia's pre-race favourite Elijah Winnington (3:45.20) shot out to an early lead before starting to fade at the halfway mark and eventually come seventh. The U.S.' Jake Mitchell, who qualified for the Olympics via a time trial, added 0.01 s from his preliminary time to place eighth.

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

No new records were set during the competition.

Qualification
The Olympic Qualifying Time for the event is 3:46.78. Up to two swimmers per National Olympic Committee (NOC) can automatically qualify by swimming that time at an approved qualification event. The Olympic Selection Time is 3:53.58. Up to one swimmer per NOC meeting that time is eligible for selection, allocated by world ranking until the maximum quota for all swimming events is reached. NOCs without a male swimmer qualified in any event can also use their universality place.

Competition format
The competition consists of two rounds: heats and a final. The swimmers with the best 8 times in the heats advance to the final. Swim-offs are used as necessary to break ties for advancement to the next round.

Schedule
All times are Japan Standard Time (UTC+9)

Results
The swimmers with the top 8 times, regardless of heat, advance to the final.