Right before Macbeth plans to kill Duncan he is hallucinating a floating dagger. This is because Macbeth is having an internal conflict, he is feeling bad and paranoid about what he is about to do. He then says to himself that he needs to kill Duncan now before he talks himself out of it.
Macbeth sneaks into the room where Duncan is sleeping with the guards dagger and them kills Duncan. And then the original plan was to put the daggers back onto the passed out guards. However, he panics and doesn’t put them back.
Macduff discovers Duncan is dead, and Macbeth and Lennox come into the room. Then Macbeth proceeds to kill the two guards so they couldn’t question them. They all believe that the guards killed Duncan except for Macduff and Ross. Macduff and Ross leave so they both can’t be killed.