Unlike his father who trusted too easily, Malcolm does not trust Macduff. He does not trust him because he thinks that Macduff may be secretly working for Macbeth. To test this theory he rambles lies giving examples of how he is not fit to be king. However, it is Macduff's polite reaction of disagreeing with Malcolm which makes Malcolm believe Macduff.
Malcolm suspects everyone that comes from Scotland and therefore might be a spy for Macbeth.
Macduff believes that Macbeth killed King Duncan and thus doesn't believe Macbeth should be king. This is evident in the fact that while Macbeth goes to Scone, Macduff finds Malcolm and convinces him to reclaim the throne.
Macduff's threat to leave makes Malcolm realize the extent of his loyal followers and the importance of maintaining their trust. It also prompts Malcolm to prove his commitment to Scotland and regain Macduff's support by revealing his true intentions and moral character. Ultimately, Macduff's threat serves as a turning point in the story, leading to a deeper bond between the two characters and strengthening their resolve to overthrow Macbeth.
Malcolm advises Macduff to go out and fight to help place Malcolm on the throne. All Malcolm sees in Macduff's suffering is an opportunity to gain an ally.
He was testing Macduff to see if he genuinely had the interest of Scotland at heart. When Malcolm says "He hath not touched you yet" (IV, iii, 14) it means that he suspects Macduff is in league with Macbeth to take him prisoner and kill him. Malcolm then makes up all his vices to make sure that Macduff wants a good king and not just Malcolm. When Macduff responds that with his vices, Malcolm would make a terrible kind, Malcolm responds that he made the vices up and he knows that Macduff has Scotland's best interests at heart.
Malcolm is testing Macduff's integrity. If Macduff had embraced Malcolm's worldly, unethical responses, Malcolm would not have trusted him enough to form an alliance with him. When Macduff wails at the imminent hopelessness of Scotland, Malcolm knows he is in the presence of a good man, and he reveals his own "innocence" and stalwart loyalty to Scotland and to God.
Malcolm asks Macduff about his family to test his loyalty and see if Macduff is truly trustworthy. He pretends to be a tyrant like Macbeth to see if Macduff would still support him.
Macduff and Malcolm plan to overthrow Macbeth in England.
Both Malcolm and Macduff believe Macbeth is a tyrant to be overthrown. However, Malcolm is a tyrant himself, if not even more repulsive than Macbeth. Though Macduff is not fully aware of this fact. Malcolm manipulates Macduff into slaying Macbeth and then plea allegiance to himself as the King of Scotland.
By not committing to join Macduff in overthrowing Macbeth, Malcolm gains the opportunity to test Macduff's loyalty and dedication to the cause. It also allows Malcolm to assess Macduff's character and leadership abilities before fully trusting him in the rebellion against Macbeth.
It's a two-part answer. One, Macbeth is a traitor and killed the King of Scotland. Macduff is loyal to the rightful heir, Malcolm. Macduff assists Malcolm in the retaking of Dunsinane castle and murders Macbeth. But Macbeth also hired assassins to have Macduffs family murdered. Macduff's wife and children were all murdered after he fled to England with Malcolm.