Costolo, who has worked at Twitter since 2009 and has been chief executive since taking over from the co-founder Evan Williams in 2010, will continue to sit on Twitter’s board of directors.
Dorsey will serve as interim chief executive alongside his position as chief executive of the payments and financial services company Square, which he co-founded in 2009.
He was previously chief executive between May 2007 and October 2008.
Twitter has set up a search committee to look for a permanent chief executive. It will work with an executive search partner and consider internal and external candidates.
The committee will be led by the lead independent director, Peter Currie, the president of the private investment company Currie Capital.
Other directors on the search committee include the Benchmark Capital general partner and venture capitalist, Peter Fenton and Williams, now the chief executive of the online publishing platform Medium and technology systems company The Obvious Corporation.
Costolo said: "I am tremendously proud of the Twitter team and all that the team has accomplished during my six years with the company. We have great leaders who work well together and a clear strategy that informs our objectives and priorities.
"There is no one better than Jack Dorsey to lead Twitter during this transition. He has a profound understanding of the product and Twitter’s mission in the world as well as a great relationship with Twitter’s leadership team."