The original uncorrected proof copy of Harry Potter and the Philosopher's Stone was found during the summer holidays at St Kenelm's Primary School in Minster Lovell, Witney, Oxfordshire.
The book was offered up for sale by Hansons Auctioneers but the £13,000 bid offered failed to meet the reserve price of £15,000.
Only 200 of the proof copies - which have no illustrations or cover art - were printed by Bloomsbury in 1997 and the book was originally bought for just £1.
The author is listed as 'J. A Rowling' before the writer, whose name is Joanne, adopted her now famous pen name.
The adventures of the boy wizard went on to become a global hit and Rowling wrote six more books in the series, charting Harry's years at Hogwarts School of Witchcraft and Wizardry.
Bob Alder, 75, retired headteacher of St Kenelm's school, revealed the book was bought at an annual warehouse sale by publishing house Red Books in Witney.
He said: "It was quite by luck that the Harry Potter was spotted in the sale. It had none of the attractiveness of a typical child’s paperback. It cost £1. It was not thought to have any value. However, it was known from press coverage that the story was something special, and to read extracts to the children would encourage them to own their own copy.
“Fortunately, first editions were soon purchased by children as well as the school, so the uncorrected, proof copy was left largely untouched on the shelves among other intensely read Harry Potter books."
The book was put away and went missing somewhere within the school for eight years.
Alder added: “The book was rediscovered in 2023 during a tidy up, and knowing there were only 200 copies issued, it seemed time for it to find a new owner who would properly value it as the beginning of what has become an international phenomenon and also know that he or she will be helping fund children in St Kenelm’s School to further develop their own love of literature.”
Jim Spencer, head of books at Hansons Auctioneers, told the BBC: "Ultimately, if we'd sold it for too little, that would have been wrong. It fully deserves to reach the top end of £15,000 to £20,000.
"With such a good cause, I wanted to get a big chunk of money for the school."
The book will be put up for auction again in November.
In the same auction a hardback copy of Harry Potter and the Philosopher's Stone sold for £15,000. It was extremely rare being one of just 15 copies published in 2012 to mark the 15th anniversary of the original publication. It was signed by Rowling and was won in a school competition. The edition was never offered for retail.
In 2022 a worn and damaged copy of Harry Potter and the Philosopher's Stone appeared on the Antiques Roadshow and was valued at £1,500 as it had been signed by author Rowling.
Watch: Battered copy of Harry Potter valued on Antiques Roadshow