The Apology of Socrates is written by Plato. In one of the world's great miscarriages of justice, Socrates, in his 70th year, was accused of corrupting the youth of Athens and of impiety. The accusation arose in part from confusion in the minds of many people, a confusion that identified Socrates with the Sophist philosophers, whose position Socrates abhorred. In part the charge arose from Socrates' low opinion of poets. That opinion had offended Meletus, the poet who was Socrates' chief accuser.
In any case, the high-minded and religious Socrates was brought to trial on trumped-up charges before a panel of 501 judges of the Athenian heliastic court—a court whose judges were annually appointed from among the Athenian male citizenry. A 30-vote majority convicted him. Though no penalty was specified for conviction on the charges that Socrates faced, a guilty verdict led to a second proceeding in which both the accusers and the accused could propose a penalty. The judges then decided between the two penalties proposed; no compromise was admissible. The accusers proposed death. Socrates at first proposed being maintained at the public expense by being allowed to take his meals at the prytaneum (the town hall where guests of state were entertained). This penalty was essentially a reward for the services that Socrates had provided for Athens (Colaiaco, p.102-105). That proposal, however just it might have been, was a rhetorical ploy. Socrates then ran through a list of potential alternatives: exile, imprisonment, paying a fine. As he had no money of his own, he suggested he could afford a fine of one mina of silver. His friends, however, suggested that he propose a fine of 30 silver minae—a sum they would guarantee.
The court imposed the death penalty—probably thinking that Socrates would choose to escape into voluntary exile rather than be executed. The judges also probably never expected the sentence to be carried out (Stone, p.42-58). When it was, Plato wrote up the proceedings that had led to his teacher's execution. In the opinion of Howard North Fowler, a distinguished classical scholar and translator of the Apology, both its form and its content, as well as what we know from other sources about Socrates' characteristic method of discourse, suggest that Plato followed closely Socrates' actual speeches in his own defense and with respect to his sentencing (West, p.69-72).
In his own defense, Socrates first refutes the truth of his accusers' assertions. He then apologizes if he fails to follow the expected forms for speaking to the court since it is the first time he has been there. He points out that he has long been the victim of false accusations. He objects that he has no opportunity to cross-examine his accusers. He nonetheless intends to answer the long-standing accusations of persons not before the court. Scoffing at Aristophanes' unflattering theatrical portrayal of his stage Socrates, the real one call on the many members of the panel of judges who have spoken directly with him or who have heard him speak ...