The archetypal pencil may have been the stylus, which was a thin metal stick, often made from lead and used for scratching in papyrus, a form of early paper.
The idea of the pencil probably originated from a thin metal stick made from lead that was used to scratch on an early type of paper.