Macbeth, one of William Shakespeare's most famous tragedies, was written between 1606 and 1607. It is believed to have been inspired by the political climate of the time, particularly the anxiety surrounding the rule of King James I. The play explores themes of ambition, guilt, and the consequences of tyranny.