The 9th mitzvah is that we are commanded to sanctify G‑d's Name.
The biblical source of this commandment is G‑d's statement1, "Sanctify Me amidst the Jewish people."
This mitzvah requires us to publicize the true religion to the masses. This must be done without fear of retribution, to the extent that even if a powerful tyrant tries to force us to deny G‑d (exalted be He), we may not obey him. We must rather unquestioningly submit to death, not even allowing him to think that we have denied G‑d (exalted be He) [by outwardly denying Him], even if we still maintain belief in Him in our hearts.
This is the mitzvah of "Santifying G‑d's Name," in which all Jews are obligated. This means that allow ourselves to be killed by a tyrant for love of G‑d (exalted be He) and belief in His Oneness. [This is] similar to the actions of Chanaya, Mishael, and Azaryah in the days of the wicked Nebuchadnezzar, who forced people to bow down to a statue, and everyone — including Jews — bowed down. There was nobody there to sanctify G‑d's Name, and this was a tremendous shame to the Jewish people. Everyone did not fulfill this mitzvah, and there was nobody to fulfill it; everyone was afraid.
This commandment is obligatory only in such an awesome setting, when all inhabitants of the world were terrified, and it was then necessary to spread and announce His Unity.2
But G‑d had already promised through His prophet Isaiah that the Jewish people would not be completely disgraced on that difficult occasion; and that a few young men3 would be present who would not be afraid of death, and would give up their lives and publicize faith in G‑d, sanctifying G‑d's Name in public as we have been commanded through Moses. This promise is in the verse4, "Now, Jacob will not be afraid, nor will his face turn white; for he will see in his midst his children, the work of My hands. They will sanctify My Name, the Holy One of Jacob, and strengthen the G‑d of Israel."
[We see that this action is obligatory, and therefore counts as a mitzvah from] the Sifra: "Upon this condition I took them out of Egypt; on condition5 that they publicly sanctify My Name."
In the end of tractate Sanhedrin, they ask, "Is a non-Jew commanded to sanctify G‑d's Name or not? Here is a statement which proves it: 'The seven commandments of the non-Jews.' If you include this one [i.e. to sanctify G‑d's Name], there would be eight!" (i.e., they are not required to submit to martyrdom). From this we see that, for Jews, [sanctification of G‑d's Name] counts as a mitzvah.
They bring proof that this is counted among the mitzvos from the verse, "Sanctify Me amidst the Jewish people."
The details of this commandment have been explained in the 7th chapter of the tractate Sanhedrin.