What we do have is a fair amount of forensic oratory, most famously Cicero in Rome and the canon of ten in the Greek world.
Some of these are like detective stories working backwards; evidence is presented rather than found. Unlike detective stories, these are real, and these speeches were composed and delivered by real people in real courts about about real crimes...probably. In a lot of cases we don't know the outcomes of the trial or truth of the matters at hand, which I personally find both fascinating and frustrating.
Lysias 1 is short and famous. It's got adultery and murder and everything you could want.
Greece:
To answer the first question, It would be a yes, and a no. Yes, because the city of Athens developed a court for homicide called the Areopagus (also called Areios Pagos, Areiopagus, and Rock of Ares), which dealt with anything from small claims issues, to homicide. However, this would be broken up into four separate courts. Which are the Prutaneion, which tried cases of death caused by an animal or inanimate object, the Palladion, which dealt with cases of involuntary homicide and the killing of non citizens, the Delphinion, which tried cases of justifiable homicide, and the Phreatto, which tried those who, while in banishment for involuntary homicide, were charged with murder or intent to harm. From what I was able to gather, there are only hints about detectives for the court(s), which leads me to the "No" part of my answer.
After the Dark Ages - About 1200-900 BC - and beginning at about 900 BC, the Ancient Greeks had no official laws or punishments. Murders were settled by members of the victim's family, who would then go and kill the murderer. This often began endless blood feuds.
Mainly, those who did any sort of detective work were those families who had victims. Of course, some might have sought out the justice system of the time, but mostly, they took the matter into their own hands.
As to the second question, I was unable to find anything pertaining "detective stories".
Sources:
http://www.crystalinks.com/greeklaw.html
Archaic and Classical Greece: A Selection of Ancient Sources
History of Greece and of the Greek People from the Earliest Times, Volume 2, Part 2
Rome:
Much of Rome is a copy of Greece, and their legal system is no different. They had what was known as the Leges Duodecim Tabularum (also called Duodecim Tabulae, or the Law of the Twelve Tables). These Tables established the rules for being summoned by a magistrate, setting up court dates, slavery, to rulings of capital punishment. There is also the Honour Killings that still occur today, which has ended in a blood feud time and time again.
In many ways, the Roman court system surpasses that of Greece. Such as the jury system and its use of lawyers. However, the lawyers of ancient Rome were not trained in law, but in manners of speech. Basically, if you have the best silver tongued lawyer on your side, you could win regardless of evidence and witness testimony. This also leads us to believe they had a detective system in place.
Sources:
http://www.dl.ket.org/latin2/mores/legallatin/legal01.htm
The Roman physician Antistius performed an autopsy on Julius Caesar and that autopsy report was possibly history’s first recorded application of medical knowledge to a homicide investigation and also the first record in history of a pathologist giving an opinion as an expert witness.
( the report found that of the 23 wounds, none were fatal except the second wound in the breast. That report on Julius Caesar’s death gave rise to the term “forensic” - in Latin forēnsis, meaning "of or before the forum"*)
Interesting article Et tu, Julius?, on a new investigation into history's most infamous murder.
edit: * added origin of the word forensic.
It's not in Greece or Rome, but around this time period, stories of a Chinese Judge/detective named Dee was solving crimes. Poe may be given credit for the invention of the modern detective story - as has been pointed out - but this collection of stories predates Poe by a long shot, and it's got the same kind of feel.