命 means “life”.
This は is the contrastive particle, used instead of the を particle, in order to contrast 命 with something in the main clause. So let’s move on for now and we will come back to this later.
捨てて is the te-form of 捨てる meaning “to throw away” and a verb te-form followed by も means “but” “although”, or “even if one does something”.
So 命は捨てても means “Even if I would throw away my life” or “I would give up my life but”.
男 means “man”.
The を particle indicates the direct object of the verb 捨てる so 男を捨てる literally is “to throw away man” which can be translated as “to give up my manhood”.
気 in this case is used to mean “intention” or “motivation”. And here is the other contrastive particle は used instead of the が particle and なかった is the past negative form of ある meaning “to have” and 気がある following a verb dictionary form means “to feel inclined towards doing something” or “be willing to do something”.
So 男を捨てる気はなかった means “I was not willing to give up my manhood” or “I did not want to give up my manhood”.
So 命 and 男を捨てる気 are compared as he is saying that he would give up his life but he wasn’t willing to give up his manhood.
He could also say 命は捨てても男は捨てる気がなかった which is simply comparing 命 and 男. But the は particle also has the function of emphasising the predicate.
Let’s compare these sentences.
- 男は捨てる気がなかった – the emphasis goes onto 捨てる気がなかった meaning “I didn’t want to give up”
- 男を捨てる気はなかった – the emphasis only goes onto なかった which makes the negation stronger, so it’s like “I DID NOT want to give up”.
Lastly, わい is the softer and comical version of the sentence ending particle わ which is used to emphasise your opinion and make it sound more assertive.