You want to get rid of murderhobos?
Give your PCs enduring connections to the community -- family, friends, professional acquaintances, organizations, and so on -- and then don't destroy them for cheap drama.
@benlehman there is a game that does that really well, Beyond the Wall? Its sorta DnD, but chargen involves making village with NPCs. Then play is about exploring the wilds in and around the village.
@questingace I've heard great things about Beyond the Wall! IDK, I just read an article about murderhobos which was like "how can we possibly stop D&D players from doing this? We just can't" and got pissy.
@benlehman SERIOUSLY! That's the most asinine take (I've got a binder with my very own POD collection of BtW, if you want to gander at it).