LOS ANGELES — Thomas O. Staggs, the favored contender to lead Disney after Robert A. Iger’s retirement, is making a surprise exit from the company, throwing succession into disorder. His departure will also be an internal distraction as Disney prepares to unveil Shanghai Disneyland, a crucial project that Mr. Staggs had helped guide.

The exit of Mr. Staggs, who became the Walt Disney Company’s No. 2 executive last year, beating out another candidate, was described on Monday by two people with knowledge of the matter, who spoke on the condition of anonymity. Disney declined to comment.

Mr. Staggs, according to these people, will step down as Disney’s chief operating officer early next month. Over the last year, as Mr. Staggs came under intense scrutiny by Disney’s board, it became clear that at least some board members were not convinced that Mr. Staggs, 55, had the skills required to maintain Disney’s creative momentum, these people said. Mr. Staggs and Disney mutually decided to part ways.

Disney has tended to choose chief executives from within, but the board may now look outside for a successor to Mr. Iger, who has led Disney to record-breaking results.

Last year, when Mr. Staggs was elevated to chief operating officer from theme park chairman, Disney insisted that it was not a coronation. The company acknowledged, however, that the promotion made Mr. Staggs Mr. Iger’s handpicked heir, pending the board’s approval. Mr. Iger said in 2014 that he would step down as chief executive and chairman in June 2018, a two-year extension from a previously announced retirement.

Disney has a history of bumpy transitions of power. When Michael D. Eisner turned over control to Mr. Iger in 2005, the changeover became an example of what not to do. It got so bad that Roy E. Disney, the nephew of Walt Disney, used the lack of succession planning in a public attack on Mr. Eisner.

A decade earlier, Disney endured a lesser degree of succession strife with Jeffrey Katzenberg, who resigned as chairman of Walt Disney Studios after Mr. Eisner refused to promote him to president of the broader company. There was also an ill-fated run by Michael S. Ovitz as president of the entertainment conglomerate.

In many ways, choosing a successor for Mr. Iger is a near-impossible task. Under his leadership, Disney has made a number of transformative acquisitions, including buying Marvel Entertainment, Lucasfilm and Pixar Animation Studios. Last year, Disney had $8.4 billion in profit, a 12 percent increase from the year before.