Shortly before he murders Duncan in effort to usurp the throne**,** Macbeth experiences a hallucination of the dagger that will be used to dispatch King Duncan.
This is a classical case of a sentence starting with a dependent clause.
"Shortly before [...] to usurp the throne." is not a valid sentence, making it a dependent clause (cannot exist on it's own).
The clause must therefore be succeeded by a comma. (see rule 4a, grammarbook.com)