Mr Cox joined in 2005, a year after Facebook was founded, while Mr Daniels took up his role only a year ago.
No reason has explicitly been given for their departure.
The changes come shortly after Mr Zuckerberg outlined his plan to transform Facebook into a “privacy-focused platform.”
This week the social media giant and its platforms WhatsApp and Instagram also experienced the worst outage in the company’s history. Facebook later blamed the blackout on a “server configuration change”.
Mr Cox, a confidante of Mr Zuckerberg, started as a software engineer at the firm and helped to build several key features including News Feed.
He also held several senior roles, heading up human resources and helping to launch Facebook’s business platform Workplace.
In a separate Facebook post, Mr Cox addressed the recent proposal to shift Facebook further towards private, encrypted communication.
“This will be a big project and we will need leaders who are excited to see the new direction through.”
He did not give a reason for leaving, but Mr Zuckerberg insisted that he had “been discussing… his desire to do something else” for several years.
Mr Daniels, meanwhile, started as head of Whatsapp after five years of running Internet.org, an initiative to boost internet connectivity around the world.
He will be replaced by Will Cathcart, who currently heads up Facebook’s mobile app. Fidji Simo, who ran the app while Mr Cathcart was away on paternity leave, will take on his role.
No replacement has been announced for Mr Cox.
Facebook has lost several top executives during the last two years, including its general counsel, chief security officer, and co-founders of WhatsApp, Instagram and Oculus, a virtual reality firm it bought in 2014.
Facebook has been sharply criticised in the past over lack of user privacy and the spread of offensive content and misinformation.
Despite the scandal, Facebook says its user numbers have continued to grow. It says the number of people who logged into its site at least once a month jumped 9% last year, to 2.32 billion people.
User numbers in the US – its second-largest market – have fallen by 15 million since 2017, however, according to market research firm Edison Research.