The announcement initially sent the social media firm's shares down 4%, but the stock was nearly flat in after hours trade.
"When I took this job in 2008, I hoped I would be in this role for five years. Fourteen years later, it is time for me to write the next chapter of my life," she wrote.
Chief Growth Officer Javier Olivan will take over as chief operating officer, Zuckerberg said in a separate Facebook post, although he added that he did not plan to replace Sandberg's role directly within the company's existing structure.
"I think Meta has reached the point where it makes sense for our product and business groups to be more closely integrated, rather than having all the business and operations functions organized separately from our products," he said.
Olivan has worked at Meta for more than 14 years and has led teams handling Facebook, Instagram, WhatsApp and Messenger.
Sandberg's departure marks an end of an era for Meta, which is shifting focus toward hardware products and the "metaverse" after years of scandals over privacy abuses and the spread of conspiratorial content on its platforms, as well as plateauing user growth on its flagship app Facebook.
The second-in-command to founder Zuckerberg, who was 23 years old when he hired her, Sandberg is one of the most visible executives at the company and the lead architect of its often-criticized ads-based business model.
Bringing management experience and knowledge of the then-nascent digital ads industry, she transformed Facebook from a buzzy startup into a revenue behemoth, while also positioning herself as the face of feminism in corporate America.
At the time, Facebook was making $272 million in revenue, for a net loss of $56 million, according to regulatory filings. By 2011, a year before the company's initial public offering, its revenue had shot to $3.7 billion on $1 billion in profits.
Meta ended 2021 with revenue of $118 billion and earnings of $39.4 billion.
Sandberg said in her post that she will continue to serve on Meta's board after leaving the company in the fall.
When asked about her next steps, she told Reuters she was focusing on philanthropy at a "critical moment for women."
Sheryl Sandberg, COO of Facebook and current chair of the Global Internet Forum to Counter Terrorism (GIFCT), gives a news conference on the sidelines during the 2019 United Nations Climate Action Summit at U.N.
"We've hired so many great leaders. I feel really good about that. The next leadership team is in place to take the company forward," she said, mentioning Chief Business Officer Marne Levine and President of Global Affairs Nick Clegg by name.
Sandberg has been a staunch defender of Facebook over the course of its many controversies, consistently arguing that executives were learning from their mistakes and honing the company's tools to better police against harmful content.
She told Reuters last year that she and Zuckerberg had a responsibility to fix systems that had failed, while rejecting reports that she was losing power at the company.
"People love headlines about corporate drama, and I think it's fair to say they particularly love headlines about sidelining women," she said in the January 2021 interview.
Sandberg's tenure covered both Facebook's original settlement with the U.S. Federal Trade Commission in 2011 for privacy violations and a subsequent blockbuster $5 billion settlement for violations of the earlier deal.
She and Zuckerberg were among those that then-Commissioner Rohit Chopra said should have faced more investigation for their roles in the company's behavior.
Under her leadership, the company was buffeted by revelations in 2018 that U.K. consultancy Cambridge Analytica had improperly acquired data on millions of its U.S. users to target election advertising.
The same year, U.N. human rights investigators said the use of Facebook had played a key role in spreading hate speech that fueled violence against the Rohingya community in Myanmar.
She courted additional criticism when she told Reuters early last year she believed events around the Jan. 6 attack on the U.S. Capitol were largely organized on other platforms, although researchers had identified similar activity on Facebook as well.
Whistleblower Frances Haugen late last year accused the social media giant of repeatedly prioritizing profit over clamping down on hate speech and misinformation, and said her lawyers had filed at least eight complaints with the U.S. Securities and Exchange Commission.
Prior to joining Facebook, Sandberg was vice president of Global Online Sales and Operations at Google and chief of staff for the United States Treasury Department under former President Bill Clinton.
A Harvard University graduate, Sandberg is the author of several books, including the 2013 feminist manifesto "Lean In: Women, Work, and the Will to Lead."