The phrase ‘a bad name’ means ‘a bad reputation’. However untrue the charges may be, they may ruin a man’s reputation and so ‘hang him’ – that is, end all chance of his ever re-establish himself as an honest and respectable citizen. This is much the same as Fling dirt enough and some will stick.