The Taliban, which was removed from power by the US-led forces in 2001, also vowed to further intensify attacks in the country.
"The Taliban Forces in Farah city #Afghanistan would much rather have heard #Yanny or #Laurel than the deafening #BRRRT they got courtesy of our #A10", the tweet said.
"This week, the Afghan national defense and security forces, supported by US air power and advisers, defeated a major Taliban offensive in Farah City in western Afghanistan".
The message was published at 8:44 a.m.in Washington on the main Air Force account, ostensibly to draw attention to the US military response to an attack on the Afghan city of Farah.
The offending tweet, which has since been removed.More news: Some sleep through volcano's latest eruption, but geologists are wary
More news: Allardyce set for axe as Everton manager
More news: Italian great Gianluigi Buffon set to announce retirement
Pentagon spokeswoman Dana White was asked at a press briefing on Thursday whether she thought the tweet's tone was appropriate. Next time get a perspective from the folks who carried out the missions.
As if the internet wasn't already enough of a divisive hellscape, an audio clip emerged online earlier this week, splitting public opinion in a way not seen since the "What colour is this dress?" scandal of 2015.
The Afghanistan tweets, too, come as the USA tries to convince the Taliban to accept Afghan President Ashraf Ghani's offer of peace talks without preconditions.
Even last week, the Afghan Defense Ministry insisted that 18 important Taliban commanders, including Mawlawi Baryal, a member of the Quetta Shura, were killed in the attack.
U.S. President Donald Trump sometimes uses Twitter to send toughly worded messages or lob insults at his foreign counterparts, such as North Korean leader Kim Jong Un or Chinese President Xi Jinping.
Some users came to the tweet's defense and said critics were being too politically correct, but a few hours after the tweet was published, the Air Force took it down.