"It's... old news that I hope one day to write the definitive Harry Potter encyclopedia," Rowling said in a statement, adding that she intended all the royalties from the publication to go to charity.
"I cannot, therefore, approve of 'companion books' or 'encyclopedias' that seek to preempt my definitive Potter reference book for their authors' own personal gain," she added.
"The losers in such a situation would be the charities that I hope, eventually, to benefit."
The lawsuit seeks unspecified damages and an injunction against RDR Books preventing it from publishing the encyclopedia, which it describes as "the most trusted reference source on earth about the wonderful world of Harry Potter."
"We are seeking to protect our intellectual property rights in the interests of fans and so that everyone can continue to enjoy Harry Potter books and films in the spirit in which they were created," Warner Bros said in a statement.
Rowling, 42, has become a billionaire from the Potter phenomenon, with the books translated into 64 languages.
The first in the boy wizard series, "Harry Potter And The Sorcerer's Stone," was published in 1997 and the final and seventh novel, "Harry Potter And The Deathly Hallows", broke records after going on sale in July.