Ms Yaccarino, who is 60 years-old, will oversee business operations at the platform, which has been struggling to make money.
Since buying Twitter, Mr Musk cut 75% of its employees including teams charged with tracking abuse and changed how the company verifies authentic accounts.
Meanwhile, advertisers have left in large numbers.
Ms Yaccarino is credited with helping to steer NBCUniversal through the upheaval caused by technology firms.
In her former role, she overhauled the ad sales business, pushed the 2020 launch of its ad-supported streaming platform Peacock, and drove industry-wide debates about data gaps as audiences migrated online.
This article contains content provided by Twitter. We ask for your permission before anything is loaded, as they may be using cookies and other technologies. You may want to read Twitter’s cookie policy, external and privacy policy, external before accepting. To view this content choose ‘accept and continue’.
The BBC is not responsible for the content of external sites.
Ella Irwin took the post when previous head Yoel Roth left in November 2022 – a month after Mr Musk took over the company.
The head of trust and safety is tasked with content moderation, a topic which has come under the spotlight since Mr Musk’s takeover of the firm.
The reason for Ms Irwin’s resignation is unclear. However, it came a day after Mr Musk publicly criticised a content moderation decision made at Twitter.
Since buying Twitter for $44bn (£35.4bn), Mr Musk had been under pressure to find someone else to lead the firm and refocus his attention on his other businesses, which include electric carmaker Tesla and rocket firm SpaceX.
He will continue as Twitter’s executive chairman and chief technology officer.