How does Macduff betray his family in Macbeth?
This is a really interesting question, because I don't actually believe that Macduff does betray his family in this play, or at least not intentionally. Certainly the event you are refering to is when Macduff leaves Scotland to join the forces of Malcolm in England, effectively betraying his monarch, Macbeth, and committing treason. This means that he leaves his wife and children free to be slaughtered by Macbeth unprotected in Act IV scene 2. Note what his wife says about her husband:
Wisdom! to leave his wife, to leave his babes,
His mansion, and his titles, in a place
From whence himself doth fly?
However, I believe that Macduff's failing isn't betrayal of his family. His contrition and anger when he finds out about their slaughter indicates that he did not consciously betray them. His failing is that he severely underestimated the evil of Macbeth and the lengths that he would go to to revenge Macduff's betrayal of him. Macduff at the end of the day is too good, and it is his goodness that leads to his decision to leave his family behind to be slaughtered.