There are three literary devices found in this quote:
It tells the theme of appearance versus reality because Macbeth will pretend or put on a false face to give happy look so that he could hide his false heart.
In this literary device two opposing ideas are placed together in a sentence to give contrasting effect. In this quote, the contrasting ideas of “hide” versus “know” are placed in contrast to lay emphasis that Macbeth will betray his king.
“False face must hide when the false heart doth know”
Alliteration occurs on sound /f/ and sound /h/ that give rhythm to this line.