Advocacy group Global Witness says in a report published on Thursday that Facebook had accepted and carried more than a dozen political advertisements that allegedly breached Kenyan ethnic cohesion rules.
There was no immediate response from Meta's Kenya office after the ultimatum issued by Kenya's National Cohesion and Integration Commission (NCIC).
Details of what the commission will do if Meta fails to comply were not immediately available.
The company issued a statement on 20 July saying it had removed hateful content from its platform ahead of the election.
East Africa's biggest economy is in the throes of campaigning ahead of presidential, legislative and local authorities elections on 9 August.
Supporters of the leading presidential candidates, veteran opposition leader Raila Odinga and deputy president William Ruto, have used social media platforms to praise their candidates, persuade others to join them or to accuse opposing sides of various misdeeds.
The social media platforms have been abused in previous elections to spread hate speech, which is classified as a crime in Kenya.
The NCIC is a statutory body established to foster ethnic harmony among Kenya's 45 tribes, some of which have targeted each other during violence in past polls.
(Reporting by Duncan Miriri and George Obulutsa; editing by Jason Neely and Barbara Lewis)
Reuters, the news and media division of Thomson Reuters, is the world's largest multimedia news provider, reaching billions of people worldwide every day.Go to: https://www.reuters.com/