Yazdgerd III, the last ruler of the Sassanian Empire, was killed by the miller because the miller was motivated by greed for Yazdgerd's jewels. The miller saw an opportunity to seize the emperor's valuable possessions and decided to murder him in order to acquire them. This act ultimately led to the downfall of the Sassanian Empire.