Citadels: Does the crown switch hands if the king is killed?
The crown goes to the player that chose the King role card at the end of the round.
Fantasy Flight Rule book (page 14).

4) King
... If you are murdered, you skip your turn like any other character. Nevertheless, after the last player has played his turn, when it becomes known that you had the murdered King’s character card, you take the Crown (as the King’s heir).