A mob killing is called lynching. It does not have to be by hanging. Lynch does not mean to hang. It's vigilante mob killing.
mid 19th century: from
Lynch's law
, named after Capt. William Lynch, head of a self-constituted judicial tribunal in Virginia
c.
1780.