No. Socrates was executed because he was associated with the worst rulers that the city of Athens had ever known, all former students of his, who notably went on to kill thousands of Athenian citizens (not enemies, strangers, or slaves), following the defeat in the Peloponnesian War.
After the tyrants were killed and democracy was restored, general amnesty law was granted to anyone involved except the Thirty Tyrants themselves and their direct aides. However resentment, understandably, remained.
> There was a lot of bad blood between the people of Athens and Socrates’ followers. That wouldn’t have been enough by itself. But the murder of between 5% and 15% of the citizen population in 404 must have pushed things over the edge. Imagine if Osama bin Laden, Timothy McVeigh, and Saddam Hussein had all had the same person as their ethics teacher: would you be very surprised if that person got harsh treatment from a jury? And would you then call that person a martyr?
http://kiwihellenist.blogspot.com/2016/04/socrates-1-did-soc...