Did Socrates, introduce a code of conduct to Athens, who had not yet adopted a written code of civil obedience?

I was enlightened to learn that Socrates' trial inspired Plato. I had no idea that Socrates was imprisoned for his beliefs.