SAN FRANCISCO — After replacing much of Twitter’s top management team last year, Dick Costolo told members of the company’s board that he wanted them to replace him as chief executive, too.

On Thursday, they did just that, announcing that Mr. Costolo will step down July 1 and appointing Jack Dorsey, Twitter’s co-founder and former chief, as interim chief executive while they look for a permanent successor.

Mr. Costolo, a wealthy former entrepreneur who has led Twitter for the last five years, had grown tired of second-guessing by Wall Street, with its focus on the social network’s sluggish user growth and its repeated failures to make its products more appealing. In January, he confided to friends at the Consumer Electronics Show in January that he did not need the aggravation anymore.

Instead of beginning an immediate search for a new chief executive, the board kept him on, encouraging him to build up his management team and lay out a strategy for it to follow.