It’s very hard to judge exactly when the first door lock was used. From prehistoric times, man has always sought to protect himself and his loved ones from the elements and from intruders. Our cave dwelling ancestors certainly would have had door type structures to protect their ancient homes, but these would more likely have been blockage type defenses rather than locks in the way that we know them today.
The earliest instance of a lock and key device was found in Assyria in the ruins of Nineveh. The Ancient Egyptians were then able to advance from this initial device and create simple pin tumbler locks that were made from wood. Such devices did have a key and so were the first real door locks in the true sense of the word. From this point a real leap forward happened. The Greeks and Romans started experimenting and improving upon their locks. The Romans took a real leap forwards when they started to use metal as the material rather than wood, the iron locks that they created gave very effective protection from attack but also came with keys that could carried in pockets.
After this time though and the fall of the Roman Empire, there was not much development due to lack of money and no real improvements in technology. Some of this could be attributed to the dark ages of history, where nothing was properly documented so improvements and developments may have just been not effectively recorded during this time.
It wasn’t until the 18th Century that innovation picked up pace again. Improvements in technology now allowed locksmiths to really make good strides forward. Tumbler locks, Padlocks, Detector Locks and more were created during this period by inventors still household names to this day due to their creations. Names such as Linus Yale and Jeremiah Chubb who’s companies still exist and continue to innovate in the lock industry.