The judge, Army Col. Denise Lind, said any evidence or witnesses related to Obama's citizenship is irrelevant to the charges against Lt. Col. Terrence Lakin, who has 17 years of service in the U.S. military.
After failing to deploy with his unit in April, Lakin was charged with missing a movement, disobeying a lawful order and dereliction of duty.
The Uniform Code of Military Justice says the maximum punishment for both offenses -- missing his plane and disobeying lawful orders -- is a dishonorable discharge and up to two years in confinement. A guilty verdict could also result in forfeiture of Lakin's pay, which totals $7,959 a month, according to a charge sheet provided by a group sponsoring his defense.
Lakin's lawyers argued that all military orders stem from the commander-in-chief. Without evidence that Obama is eligible to be president, they say, the doctor's deployment order was illegal.
In addition to putting Obama on their witness list, Lakin's lawyers had asked Lind to order Obama's official birth records from Hawaii be brought to court for trial.
"If the president is ineligible, you need to know that," Lakin's civilian attorney, Paul Jensen, told Lind. "Col. Lakin needs to know that, the government needs to know that, America needs to know that."
The prosecutors in the case argued that Obama's eligibility is not relevant because the officers who ordered Lakin to go to Fort Campbell and then ordered him to answer questions about why he didn't go were his proper superiors in the military chain of command, and they gave him legal orders. Jensen later conceded that point.
The judge ruled that the matter of Obama's eligibility is not relevant because he did not give any orders in the case. She pointed out that while the president is commander-in-chief of the military, it is Congress that is constitutionally empowered to raise armies, pay them and equip them.
Any contention that any orders are invalid if the president is ineligible "is erroneous," the judge said.
Lind also said that military law says that a soldier's personal beliefs or convictions are not sufficient to allow that soldier to determine that an order is illegal. The soldier has to have "no rational doubt" that the order is illegal before he or she can ignore it.
Finally she ruled that a military court martial is not the forum in which to determine a president's eligibility, because the Constitution says only Congress has the power to impeach and remove the president.
Afterward, Jensen said he respected the judge's ruling, but called it distressing.
"It completely deprives us of any opportunity to present a defense in this case," Jensen said.
The court martial is set to begin in October, but Jensen said he's not giving up on the matter of Obama's eligibility.
"We will be giving the Army Court of Criminal Appeals in the next week or two the opportunity to take up the issue, and we are going to fight on for justice to be served in this case."
Lakin is among 27 percent of Americans who doubt or deny that Obama is American-born, according to a recent CNN/Opinion Research Corp. poll. They compose the birther movement, which demands that Obama present a birth certificate signed by the doctor who delivered him in 1961.
CNN and other news organizations have thoroughly debunked the rumors about the president's birthplace. Hawaii has released a copy of the president's birth certificate -- officially called a "certificate of live birth" -- and the hospital where he was born took out ads in two Hawaiian newspapers in 1961 announcing the birth.