WASHINGTON—President Donald Trump shook up his cabinet Tuesday by firing Secretary of State Rex Tillerson and choosing CIA Director Mike Pompeo as his successor, just as the White House plans to open talks with North Korea and a decision looms on the Iran nuclear accord.

The ousting of Mr. Tillerson, who first heard from the president about the move on Twitter, rippled through diplomatic circles around the world and set off a cascade of changes in the administration.

...