Sanhedrin, Chapter Two, Mishnah Two
Mishnah two contains special rules regarding the king.
1) The king can neither judge nor be judged, he cannot testify and others cannot testify against him.
2) He may not perform halitzah, nor may others perform halitzah for his wife.
a) He may not contract levirate marriage nor may his brothers contract levirate marriage with his wife.
i) Rabbi Judah says: If he wished to perform halitzah or to contract levirate marriage his memory is a blessing.
ii) They said to him: They should not listen to him.
3) None may marry his widow.
a) Rabbi Judah says: The king may marry the widow of a king, for so have we found it with David, who married the widow of Saul, as it says, And I gave you my masters house and my masters wives into your embrace (II Samuel 12:8).
Section one: The king cannot participate in the regular system of the court. This is probably due to the fear that the king will threaten the existence of the court if a decision is not found in his favor. Since he cannot be tried, it is not fitting to allow him to testify. There is also an issue of honor at stake in this prohibition. The kings honor is not just an issue of personal concern but of national concern as well. Forcing a king to participate in the legal system would, in the mind of the Mishnah, diminish his authority.
Section two: The king also may not participate in the halitzah ceremony, since part of this ceremony is the woman spitting in front of the dead husbands brother. This is obviously not respectful to a king. It is also not a sign of respect for him to have to marry his dead brothers widow (levirate marriage) in order to bring forth children under his brothers name. Since his widow may not remarry, his brothers do not perform halitzah for her or contract levirate marriage with her.
Rabbi Judah says that a king can perform halitzah and levirate marriage, and it is actually praiseworthy for him to do so (but not mandatory). In other words, according to Rabbi Judah, a king is allowed to forgo his own honor. According to those who respond to him, he is prohibited to do so.
Section three: According to the first opinion, the widow of a king may not remarry, since this is disrespectful to the dead king. However, Rabbi Judah finds precedent in David who married Sauls widow, and therefore he allows all kings to marry other kings widows (this should remind us of MacBeth!).