Convention codes of conduct really are a contemporary development, so while researching early Hugo history I was surprised to discover this one in the final paragraph of the “Convention Rules” of the 1955 Worldcon (see Clevention – PR 4 page 16):
CONDUCT 12. The Convention Committee reserves the right to revoke the membership and its attendant privileges of any person or persons who conduct themselves in such a way as to reflect unfavorably or to bring discredit to the Convention. If the Committee finds it necessary to revoke such a membership, it may, at its discretion, make it mandatory for the person or persons, from whom said membership is revoked, to leave the Convention site. It should also be emphasized that the membership will refrain from the use of armbands, placards, badges, ribbons, buttons, cards, etc. wherein a reference is made or which can be connected with a source or agency, political or otherwise, real or fictitious, that seeks the overthrow of the present government….”even in the spirit of fun”. [Ellipsis and quotes in the original]
There might even be earlier ones waiting to be discovered, because a note at the end of the 1955 rules thanks the 1953 committee and L. Sprague de Camp “for the loan of their convention rules and notes thereon” and says “We have taken the liberty of ‘lifting’ a large portion of their rules, word for word, largely, because it was felt that it would be both foolish and a large waste of time altering a set of rules that should be standard for all conventions.” However, in the 1953 Worldcon publications available at Fanac.org I didn’t find any containing a previous Code of Conduct. But who knows what fanhistorians may eventually uncover?