He said a loyal minister does not serve two masters, and he would rather die than surrender.
Tips
usage
事 here is the classical verb to serve, and 二主 is a second master. An older wording is 忠臣不事二君, which the 《史记》 records together with a companion line about a virtuous woman who never marries a second husband.