Ailes denied the allegations and accused Carlson of filing the lawsuit in retaliation for losing her job.
Carlson, the former host of a daytime show, who had worked at the network for 11 years, was abruptly let go on June 23.
Nine months earlier, during a meeting with Ailes that she called to address her belief that she had been discriminated against, she alleged that he told her that “you and I should have had a sexual relationship a long time ago.”
Carlson is taking on one of the most powerful men in the media.
Ailes built Fox News Channel from scratch in the 1990s, turning it into the top-rated television news network.
It has a profound influence on politics. Fox is highly profitable for parent company, 21st Century Fox.
The 50-year-old Carlson, who was Miss America in 1989, alleged in her lawsuit that Ailes, who is 76, ogled her, repeatedly commented about her legs, urged her to wear clothes that enhanced her figure, and told her she was sexy, but “too much hard work”.
Carlson said that she was fired as a host of the morning show, Fox & Friends, in 2013, because she had complained about sexual harassment.
Her pay reduced with the transfer to a daytime slot.
She said that one of her Fox & Friends co-hosts, Steve Doocy, “had created a hostile work environment by regularly treating her in a sexist and condescending way.”
She said that when Ailes heard of her complaints, he called her a “man hater” who needed to learn to “get along with the boys.”
21st Century Fox said that while it has full confidence in Ailes and Doocy, it has begun an internal investigation.
Ailes said that Carlson began to “conveniently” pursue a lawsuit when she became aware that Fox was not renewing her contract, citing poor ratings.
Ratings for her show, The Real Story, were lower than for any other show on the network in June, the Nielsen company said.
“Ironically, Fox News provided her with more on-air opportunities over her 11-year tenure than any other employer in the industry, for which she thanked me in her recent book,” Ailes said.
“This defamatory lawsuit is not only offensive, it is wholly without merit and will be defended vigorously.”
There was no comment from Doocy, the company said.
Carlson said that Ailes punished her by cutting back on political interviews that she conducted and ending her regular appearances on Bill O’Reilly’s prime-time show, which is generally Fox’s highest-rated.
“I have strived to empower women and girls throughout my entire career,” Carlson said.
“Although this was a difficult step to take, I had to stand up for myself and speak out for all women, and the next generation of women, in the workplace.”