"Hang" and "hang" are two different verbs-- One is strong; the other is weak. You'll often notice that they are misused When English speakers write and speak.
STRONG verbs are irregular verbs. WEAK verbs are regular. So you'll find That these are just two categories To which all English verbs are assigned.
When we say, "We hung the painting On the wall," the verb is strong. But if we say, "They hung the bandit At dawn," well, that is wrong.
"They hanged the bandit at dawn" is correct. "Hang" there is weak. As you can see, The past tense form of the weak verb "hang" Ends in the letters E and D.
So does the participle as well: "The murderous bandit was hanged at dawn." Of course, the bandit wouldn't care What verb we used once he was gone.
If you say, "The bandit was hung," You can say it if you dare, But that implies something different, And maybe we shouldn't be going there.
If you're unsure about "hung" and "hanged," Maybe do a grammar check. "We hung the ornaments on the tree"; "The violent outlaw was hanged by the neck."