"The philosopher Socrates went willingly to his death because he believed he had an obligation to respect the laws of his city even when those same laws condemned him to death (see "Living Well"). (He died by poisoning. He was forced to drink a cup of hemlock and was dead within half an hour.) His friends tried to convince him to escape. He himself thought he was condemned unjustly. but his respect for the laws and for his own sense of honor were so strong that he decided that the most important thing for him to do would be to show his belief in his own principles by dying for them."
From THE BIG QUESTIONS A SHORT INTRODUCTION TO PHILOSOPHY by Robert C. Solomon and Kathleen M. Higgins.