Prime Minister Anthony Albanese on Sunday offered the nation's respect and gratitude to all who served in Australia's name at a service to mark the 25th anniversary of the start of the campaign.
The nation's most decorated living soldier and accused war criminal Ben Roberts-Smith was among hundreds of veterans at the ceremony at the Australian War Memorial.
The 47-year-old was awarded Australia's highest military honour - the Victoria Cross - for his service in Afghanistan, but now faces accusations he murdered five unarmed detainees during his deployment.
He denies the allegations.
Former prime ministers Tony Abbott, Scott Morrison and John Howard also attended the Canberra ceremony.
It was Mr Howard who entered Australia into the conflict alongside the US and other coalition forces in the aftermath of the September 11 attacks, initiating what came to be called Operation Slipper.
"We went on the principle that September 11 was an attack on a way of life that belonged just as much to us," Mr Albanese said.
"It was not yet directly our fight, yet Australia did what is so resolutely in our nature.
"We went to support our friend and ally. We went because we saw what was at stake."
More than 35,000 Australian servicemen and women were deployed to the Middle East over two decades until their withdrawal from Afghanistan in 2021.
US troops left a few months later after signing an agreement with the Taliban, who swiftly returned to power and reintroduced authoritarian control, including strict suppression of women and girls' rights.
Some 47 Australian Defence Force personnel died as a result of their service and 263 were wounded, while thousands more allied soldiers were killed.
Tens of thousands of civilians were also estimated to have been killed during the war.
Despite the controversy over Australia's military involvement in Afghanistan and its legacy, the troops who served on the ground remain intensely proud of what they achieved.
Former soldier Mathew Bell was deployed in 2012, aged 24, with his infantry battalion to a forward operating base in Afghanistan's "badlands" west of Tarinkot.
More than a decade after he returned to Australia, Mr Bell remembers his unit's work with a sense of honour and accomplishment.
"We changed that little part of Afghanistan, that little part of the world for good," the former lance corporal, now 38, told AAP.
Mr Bell said girls were able to attend school, medical services were rolled out to villages and "there was freedom".
"Not the oppression we're seeing now under the Taliban government," the father of two said.
"Our role was essentially to go out on either vehicle-mounted patrols or foot patrols, out amongst the local population through the desert, through the green zone, keeping the Taliban at bay.
"It was a hot area. Once you stepped over that line in the sand, like, that was Taliban territory."
One of Mr Bell's close mates was badly wounded in a roadside bomb explosion and on more than one occasion, his section was pinned down by sniper fire.
Mateship and camaraderie forged under fire got them through the dangerous times, and Mr Bell remains tight with his former brothers-in-arms.
In addition to Canberra, services were held at the Anzac Memorial in Hyde Park, Sydney, the Shrine of Remembrance in Melbourne and other sites around the nation.
Australians who served in the Afghanistan War were deployed in various roles and missions contributing to reconstruction efforts, democratic governance, training and humanitarian aid.
Operation Slipper was followed between 2015 and 2021 by Operation Highroad and the Kabul airlift in August 2021.
Lifeline 13 11 14
Open Arms 1800 011 046