The question of when 'Ancient History' ends is one of hot debate. It is not as simple as saying 'until the fall of the Roman Empire
' because nobody can agree on that. The Roman Empire did not end in AD476 in the east or the west. The Western Empire
did suffer a major upheaval when in AD476, a warrior named Odoacer
made himself emperor of Rome
. Odoacer was however thoughoughly Romanised and the West had had numourous similar upheavals in the past.
Many scholars place the end of 'Ancient History' in the reign of Constantine, around AD330.
Quite a lot of historians place it at the end of the reign what they see as the last strong Roman Emperor, Justinian in AD565
A few (not many) place it at the death of what they see as the last strong Western Emperor who had the unfortunate name of Charles the Bald in AD877
As a point of interest the official end of the Roman Empire took place in AD1453 with the fall of Constantinople to the Ottoman Empire.
The answer realy lies in what area of the world you are looking at. For example the end of Ancient History in Britain is definitely before the end of the 5th Century. If you are looking at Turkey however the picture is much more hazy, and after all none of this would apply if you were looking at China.