A Dunedin secondhand book-seller was reminded it pays not to judge a book by its cover after he almost threw out an old book which contained a stash of jewellery.

Mike Hamblyn had put the book, titled The World's Best Books and published about 40 years ago, into his reject box on Wednesday but decided to leaf through it before discarding it.

To his surprise, he found the book was hollowed out and contained jewellery including a cameo brooch, ring and earrings.

"When I opened it, the jewellery fell out. There was one earring in there and I thought there must be a matching pair, so I hunted around and found the other one in the bottom of the box," he told the Otago Daily Times.

Mr Hamblyn returned the jewellery and book to the Dunedin family which had sold him six cartons of books, receiving grateful thanks and a bottle of wine.

"They said had been looking for the jewellery for years. They knew it existed but didn't know where it had gone," he said.

The family did not want to be identified or interviewed.

Mr Hamblyn said he checked the larger books in the other cartons from the family but found no more surprises.

Banknotes, photographs and strips of negatives were common finds, he said.

On one occasion he was able to return to relatives letters, photographs and diaries which he found in a box of books sold to him after their owner's death.

"It was heartbreaking to think that history was almost lost to the family."