Answer :
I think that Macduff fled because he saw the murdered of King Duncan inside the bedchambers of Macbeth. He left his castle and went to England. Macduff went to see Malcolm and had offered his support in overthrowing Macbeth from the throne. Macduff did this out of revenge after Macbeth had also murdered his family.
Answer:
The reason why Macduff, the Thane of Fife, might have felt that his family would be safe in his castle, while he fled Scotland to join with Malcolm and those who have had to flee from Macbeth´s cruelty, would be that up to that point, Macbeth´s crimes had been caused by his fulfilling the prophecies that the three witches had given him both at the beginning of the play, and at the beginning of Act IV. In these prophecies, especially those on Act VI, the witches have warned Macbeth about the Thane of Fife, not about his family, so it would be normal for Macduff to assume that Macbeth would go after him, but not after his family.
In the end, this proves a false hope as Macbeth simply, in retaliation for having lost Macduff, brutally has his family murdered. This only ensures the rage, and the oath of vengance from the Thane of Fife, who will in the end fufill the prophecy of the witches about himself, as now his own peace of mind will only come by murdering Macbeth.