These lines are ironic if they are put into the context of the entire play. In the first two scenes of Macbeth, we learn that Macbeth is a war hero and a loyal servant of the king, Duncan. This is ironic because Macbeth will later murder the king and have others killed. The additional irony in this scene is that Duncan intends to replace The Thane of Cawdor with Macbeth. (In Act 1, Scene 3, the witches suggest that Macbeth will become Thane of Cawdor before Duncan has told Macbeth himself).
The previous Thane of Cawdor had conspired with Duncan's enemy.
Norway himself, with terrible numbers,
Assisted by that most disloyal traitor
The Thane of Cawdor, began a dismal conflict, (I.ii.60-62).
Duncan ends the scene, saying, "What he hath lost, noble Macbeth hath won." (I.ii.78). Duncan thinks he is eliminating a traitor and replacing him with a noble subject (Macbeth). But the irony is that, although Macbeth begins as a loyal subject, he will prove to be a much larger threat and a traitor of the worst kind. The use of irony here highlights the transformation of Macbeth from loyal Thane to a corrupt, homicidal (and regicidal) dictator.