The policy, the court ruled, is obsolete.
"A ban on deployment may have been justified at a time when HIV treatment was less effective at managing the virus and reducing transmission risks," a three-judge panel of the 4th US Circuit Court of Appeals wrote.
"But any understanding of HIV that could justify this ban is outmoded and at odds with current science," the ruling continues. "Such obsolete understandings cannot justify a ban, even under a deferential standard of review and even according appropriate deference to the military's professional judgments."
The ruling upheld a lower court's motion last February blocking their pending discharge from the Air Force.
"I am extremely relieved to learn that I can continue to serve this country like any other service member," one of the two airmen said in a statement under the pseudonym "Victor Voe."
"Serving in the U.S. military has been the greatest honor of my life and I'm thrilled to see this court affirm the lower court ruling in our favor," he added. "No one should be discharged or discriminated against because of HIV when it does not interfere whatsoever with our capacity to serve."