Australia swim queen Campbell retires after missing out on Paris
The 32-year-old, regarded as one of the best relay swimmers the sport has known, missed out on a Paris berth in the 50m and 100m freestyle at the Australian trials this month.
"I gave the pursuit of a fifth Olympics everything I had, and therefore, even in failure, there is a small, indelible kernel of pride," she said in a statement late Wednesday.
"It's been a long and wild ride and I wouldn't change it for the world.
"I can't wait to cheer on the Australian Dolphins and the rest of the Australian Olympic Team in Paris."
Campbell made her first Olympic team aged 15 in 2008, winning two bronze medals in Beijing.
She went on to claim six more Olympic medals, four of them gold in relays.
Campbell had a similarly impressive record at the world championships, winning 12 medals including four golds.
Her world records mostly came in the 4x100m freestyle relay, an event in which she won at the last three Olympics in London, Rio and Tokyo.
She also held the 100m world record in 2016 after smashing the previous best set by Germany's Britta Steffen during the supersuit era.
"Her service and contribution to swimming is just incredible -– not just for what she achieved in the pool but also outside of it," said Australian head coach Rohan Taylor.
"She is a genuine leader, part of the Dolphins' leadership group, was always team first, and swam with heart."