Judge Paul Ridgeway said both common law and state Supreme Court precedent allow witnesses and jurors to use the text "most sacred and obligatory upon their conscience."
The ruling came after the American Civil Liberties Union argued that limiting that text to the Bible was unconstitutional because it favored Christianity over other religions.
The issue surfaced when Muslims tried to donate copies of the Quran to Guilford County's two courthouses. Two judges declined to accept the texts, saying that taking an oath on the Quran was illegal under state law.
State law allows witnesses preparing to testify in court to take their oath by laying a hand over "the Holy Scriptures," by saying "so help me God" without the use of a religious book or by an affirmation using no religious symbols.
The group sought a court order declaring the statute unconstitutional or clarifying that it was broad enough to allow the use of multiple religious texts.
Though the judge stopped short of that, the ACLU and others supporting the lawsuit still considered the ruling "a great victory."
"As of today, all people can use the holy text of their choice," said Seth Cohen, an ACLU attorney who argued the case.
"We welcome this ruling as an expression of our nation's constitutional commitment to religious diversity and tolerance," said Arsalan Iftikhar, legal director for Washington-based Council on American-Islamic Relations.
The ACLU said six other states have similar laws that favor the Bible in courtrooms: Arkansas, Delaware, Kansas, New Jersey, Pennsylvania and Virginia.
In North Carolina, it is rare for someone taking an oath at one of the state's 108 court facilities to request an alternative to the Bible, said Dick Ellis, a spokesman for the state Administrative Office of the Courts.
A trial court judge initially dismissed the ACLU's suit in December 2005, ruling it was moot because there was no actual controversy at the time.
An appeals court panel allowed the case to go forward in January, after the ACLU added Syidah Mateen as a plaintiff. In its decision, the appeals court cited Mateen's claim that her request to place her hand on the Quran as a witness in a domestic violence case was denied in 2003.
During a hearing this month, state attorneys asked Ridgeway to dismiss the case, calling the complaint political.
The state has 30 days to appeal Thursday's ruling and is reviewing it, said Noelle Talley, spokeswoman for the state attorney general.