To answer this question, take a look at what the Captain tells King Duncan in Act I, Scene II. According to his testimony, Macdonwald (described as "merciless") is a rebel who fought against the king. Supported by the treacherous Thane of Cawdor and the King of Norway, Macdonwald used soldiers from Ireland and the Scottish Hebrides to try and overthrow Duncan. This explains why Duncan is so unhappy with him.
In contrast, Duncan is happy with the Macbeth because, in the Captain's testimony, Macbeth is described as being a hero on the battlefield. Specifically, Macbeth single-handedly killed Macdonwald in battle by cutting him from the "nave to th' chops" (from his stomach to his neck) and then displayed his head on the walls of the castle.
This information prompts Duncan to call Macbeth a "valiant cousin" and a "worthy gentleman." Thus, he is extremely pleased with Macbeth and praises his loyalty and courage.