In an internal memo sent to 21st Century Fox employees, the company wrote that the decision had been made after "extensive review done in collaboration with outside counsel".
The letter - signed by Rupert Murdoch and his sons Lachlan and James - praised Mr O'Reilly as "one of the the most accomplished TV personalities in the history of cable news".
"We have full confidence that the network will continue to be a powerhouse in cable news," the statement continues, adding that they are committed to "fostering a work environment built on the values of trust and respect".
Analysis: Anthony Zurcher, BBC News, Washington
The sexual harassment charges against Bill O'Reilly aren't new. They've bubbled up before and have been quietly ushered from view, thanks to multimillion dollar legal settlements.
Now, however, they have brought down the top-rated conservative talk show on cable news.
So what changed? Was it lurid details of his alleged behaviour? The protests? Commercial sponsors abandoning his show? The impact the scandal could have on 21st Century Fox's attempts to purchase European broadcaster Sky?
All probably contributed to O'Reilly's exit. The crack in the proverbial dam, however, came when Fox News head Roger Ailes was sacked for his own sexual harassment scandal.
If Mr Ailes, who built the conservative television empire, could be laid low by his tawdry behaviour, no one was untouchable - even Mr O'Reilly.
Welcome to Fox News in the Donald Trump era. Mr Ailes is out. Mr O'Reilly is gone.
Presenter Megyn Kelly has bolted to NBC. The only giant left standing is Trump super-fan Sean Hannity.
A network that defined itself by blanket opposition to Barack Obama now appears adrift, challenged by more aggressive conservative media outlets and toxic to the left.
It's a tricky position to occupy - a victim of its own success… and hubris.
The O'Reilly Factor drew nearly four million viewers per night.
The most recent allegation came on Tuesday evening when lawyer for a former African-American clerical worker at Fox alleged her client had been harassed by Mr O'Reilly in 2008.
Lawyer Lisa Bloom said the Fox News host had referred to the unidentified woman as "hot chocolate".
"He would leer at her," said Ms Bloom. "He would always do this when no one else was around, and she was scared."
Mr O'Reilly's attorney, Marc Kasowitz, called the latest accusation part of a "brutal campaign of character assassination that is unprecedented in post-McCarthyist America".
Mr Kasowitz said this was being driven by "far-left organizations bent on destroying O'Reilly for political and financial reasons".
Media-watchers say the harassment allegations had become too much of a liability for 21st Century Fox.