Ancient history is all the events we know about between the invention of writing and the start of the Middle Ages.
Writing is one of the greatest inventions of the human species. It was invented after the Neolithic revolution in which people settled in small towns and started agriculture. Writing dates from about 3,300 BC, which is over 5000 years ago, in the Middle East. The first people to use writing were the Sumerians and the Ancient Egyptians.[1]
Before writing, the only things we have are the tools and monuments made by earlier people. This is studied by archaeology rather than history. The period of ancient history ends with the early Middle Ages.