We often use this phrase when we want to sum up some information in a concise form. Not many people know that the idiom goes back over four hundred years to the late 16th century—Shakespeare’s Hamlet uses it to mean something compact when he says, ‘I could be bounded in a nutshell, and count myself a king of infinite space, were it not that I have bad dreams’. Anyway, the Hamlet usage was not the original source.

The original phrase first appeared in ancient times, described by the Roman scholar Pliny in AD 77. It is believed that the great philosopher Cicero witnessed a copy of Homer’s epic poem the Iliad written on a piece of parchment that was quite small enough to fit into the shell of a walnut.

More Info: blog.oxforddictionaries.com