Michael Baigent and Richard Leigh had sued Brown's publisher, Random House Inc., claiming he had copied from their 1982 nonfiction book, "The Holy Blood and the Holy Grail."
Both books deal with the theory that Jesus married Mary Magdalene and had a child, and that the bloodline continues.
One of the judges said copyright protects an author's labor in researching and writing a book, but doesn't extend to facts, theories and themes.
Brown wasn't a defendant. He testified last year that he studied the plaintiffs' book when writing his best-seller but didn't copy from it.
The "case should never have come to court in the first place" and was a waste of "time and money," Random House Group Chief Executive Gail Rebuck said Wednesday in a statement.
"Misguided claims like the one that we have faced, and the appeal, are not good for authors, and not good for publishers," she said. "But we are glad that the Court of Appeal has upheld the original judgment and that, once again, common sense and justice have prevailed, helping to ensure the future of creative writing in the UK."
The authors now face legal bills of about $6 million.
Baigent and Leigh "expended a vast amount of skill and labor" on their book, their lawyers said. "That skill and labor is protectable."
Brown testified for several days during the High Court hearing last year.
The claimants' lawyer, Jonathan Rayner James, said that although the lawsuit had been against the publisher rather than the author, Brown was really the one on trial.
During a hearing earlier this year, Rayner James said issues remained about the role of Brown's wife, Blythe, who did much of the research. She didn't testify at the High Court hearing. Brown said he wanted to protect his wife from publicity.
In April, Justice Peter Smith ruled that Random House had not breached the copyright. Smith said the claim was based on a "selective number of facts and ideas artificially taken out of (the book) for the purpose of the litigation."
"The Da Vinci Code" has sold more than 40 million copies since its release in March 2003. A film version starring Tom Hanks was released last year.
Lord Justice Bernard Rix said Brown hadn't disguised his use of the work of Baigent and Leigh.
The character of Leigh Teabing is an anagram of Leigh and Baigent, Rix noted, and at one point Teabing refers to "The Holy Blood and the Holy Grail" as "perhaps the best-known tome" on the subject.
"That is not the mark of an author who thought that he was making illegitimate use of the fruits of someone else's literary labors, but of one who intended to acknowledge a debt of ideas, which he has gone on to express in his own way and for his own purposes," Rix wrote in his opinion.