Maia Kobabe's Gender Queer: A Memoir has been before the Classifications Review Board three times for its depictions of sexual experiences and gender exploration.
In July 2023, the board affirmed the book's classification was "unrestricted" but recommended it for readers over 15 years old.
Rightwing activist Bernard Gaynor challenged this decision in the Federal Court and succeeded with his bid on Monday.
Justice Ian Jackman ruled in the conservative Catholic's favour, overturning the initial classification after finding it had been unlawfully decided.
Out of 611 submissions sent to the board, 35 were in favour of an unrestricted rating while 576 were in opposition.
While the review board said those who wanted the classification to be restricted or refused entirely were overwhelmingly "broadly anti-LGBTQIA+," only 66 submissions fell into this category, the judge said.
People wrote in opposition for different reasons, including their perceptions the book contained depictions of sexual activity between adults and children, Justice Jackman said.
"The majority of the Review Board whose reasons were published in the decision cannot have read and understood the public submissions in expressing the view that they did," he wrote.
The board should not have overlooked, ignored or misunderstood the public submissions when considering the book's classification, the judge said.
This error then infected the board's findings that those who wrote submissions against an unrestricted classification had not read the book, did not understand its content or failed to engage with the book.
A letter from Dr Lesley-anne Ey, educational psychology lecturer at the University of South Australia, was sent to the board regarding a stylised drawing in the book of a "sexual encounter between an ancient Greek scholar and his student".
The board considered the letter but rejected the associate professor's claims that the image depicted a child under 18 years of age.
Justice Jackman also said the board failed to consider Dr Ey's other argument that the image showed a teacher having sexual activity with his student.
The board has now been asked to reconsider its classification of the book "according to law".
In a statement, Mr Gaynor told AAP that the book should never have been approved in Australia.
"This clear and devastating decision of the Federal Court means Gender Queer must now be removed from every library and bookstore in Australian pending a new classification decision," he said.
He criticised members of the board who "(could not) identify the child in child abuse imagery" and called on Federal Communications Minister Michelle Rowland to have a good, hard look at her bureaucrats.
In July, Kobabe told AAP it was vital that young people saw themselves reflected in media.
"Many young queer people don't have out queer family members, or mentors in school or their communities," e said.
"Many need to turn to books to learn about their identities, bodies, health, safe sex and more."
Lifeline 13 11 14
Fullstop Australia 1800 385 578