Dorsey will remain on the board until his term expires in 2022. Agrawal joined Twitter in 2011 and has been CTO since 2017.In a letter posted on his Twitter account, Dorsey said he was "really sad [...] yet really happy" about leaving the company and that it was his decision.On Sunday, Dorsey had sent a cryptic tweet reading only "I love Twitter".Twitter shares rose five per cent to $49.47 in morning trading after the announcement.Twitter was caught up in the heated political atmosphere leading up to the 2020 election, particularly when it banned former president Donald Trump following his incitement of the Jan 6 riot at the US Capitol.Dorsey defended the move, saying Trump's tweets after the event resulted in a risk to public safety and created an extraordinary and untenable circumstance for the company. Trump sued the company, along with Facebook and YouTube, in July for alleged censorship.Dorsey has faced several distractions as CEO, starting with the fact that he is also founder and CEO of the payments company Square. Some big investors have openly questioned whether he could effectively lead both companies.Last year, the company came to an agreement with two of those activist investors that kept Dorsey in the top job and gave a seat on the company board to Elliott Management Corp, which owned about 4pc of Twitter's stock, and another to Silver Lake.While Twitter has high-profile users like politicians and celebrities and is a favourite of journalists, its user base lags far behind old rivals like Facebook and YouTube and newer ones like TikTok. It has just over 200 million daily active users, a common industry metric.The early days of Twitter began with a tweet sent by Dorsey on March 21, 2006, that read: "just setting up my twttr."Twitter went through a period of robust growth during its start, but as the growth slowed the San Francisco company began tweaking its format in a bid to make it easier and more engaging to use.Dorsey became Twitter CEO in 2007, but was forced out the following year. He returned to the role in 2015.In his goodbye letter, Dorsey said he has worked hard to ensure this company can break away from its founding and founders and that to focus too much on whether companies are led by their founders is "severely limiting".Twitter also announced on Monday a new board chairman, Bret Taylor, to replace its existing chair, Patrick Pichette.Pichette will remain on the board. Taylor has been on Twitter's board since 2016 and is the president and COO of business software company Salesforce.