Duelling involved one-on-one combat between gentlemen, both armed. What Brooks did was attempt to beat an unarmed man to death. You can claim all the 'honor' you want but Brooks did try and kill an older man without giving him a chance to defend himself. Hardly the actions of a gentleman.
According to the code, you only challenge your social equal. Sumner didn’t qualify.