All three title pages of the books had been signed by the author, JRR Tolkien. They had attracted huge interest at the auction in South Cerney.
The auction also included one of the earliest manuscripts of The Hobbit, which was sold for £3,200.
The set of books was estimated to sell for between £10,000 and £15,000.
Chris Awbery, from Dominic Winter Auctioneers, said the books were from Rayner Unwin of the publishing firm, Allen and Unwin.
He said: “Tolkien fans may not immediately recognise the name, but if they look at the spines of their books they’ll find they are the publishers of the books, from The Hobbit onwards.
“Rayner Unwin was as a 10-year old, given the manuscript of The Hobbit by his father, Sir Stanley Unwin, saying ‘what do you reckon to this?’
“He read it and gave a reader’s report and said it was very good and should appeal to seven to nine-year-olds. He [Sir Stanley] published it, and the rest is history.”