He will be replaced by the current chief technical officer, Parag Agrawal, Twitter said.
Mr Dorsey, who co-founded Twitter in 2006, has been serving as chief executive of both Twitter and payment firm Square.
"It's finally time for me to leave" he wrote in a statement, saying the company was "ready to move on."
Mr Dorsey said he had "deep" trust in his replacement. "I'm deeply grateful for his skill, heart, and soul. It's his time to lead," he said.
Mr Agrawal joined Twitter in 2011, and has been the firm's head of technology since 2017.
'I love Twitter'
Mr Dorsey challenged corporate conventions with his nose-ring, long beard, and a wellness regime including yoga and eating only one meal a day.
But he came under pressure from investors, who felt Twitter was not getting the focus it needed while he was also running Square.
On Sunday, Mr Dorsey tweeted, apparently unprompted: "I love Twitter."
In a separate message to the official corporate statement, Mr Dorsey tweeted: "Not sure anyone has heard but I resigned from Twitter."
"There's a lot of talk about the importance of a company being 'founder-led'. Ultimately I believe that's severely limiting and a single point of failure," he wrote in an attached email he sent to staff.
He added that he would leave the board after his term expires.
"Why not stay or become chair? I believe it's really important to give Parag the space he needs to lead."
Twitter's share price jumped as rumours of Mr Dorsey's departure emerged, first reported by CNBC.
But by mid-afternoon shares were trading just under their value at the end of last week.