In the metaphorical phrase, die refers to a numbered cube used in gaming (the singular of dice), and cast means thrown. The phrase is attributed to Julius Caesar, who reportedly said it (in Latin) as he crossed the Rubicon river with one of his legions to start the civil war that would bring him to power.