Senator Elizabeth Warren of Massachusetts on Tuesday broke from her Democratic rivals by declining to participate in a Fox News town hall, denouncing the cable news channel as “a hate-for-profit racket” that seeks to turns Americans against one another.

In the harshest criticism to date from a presidential contender against Fox News, Ms. Warren used a series of Twitter messages to accuse the network of giving “a megaphone to racists and conspiracists” and providing cover for corruption. She also returned to one of her campaign’s central themes, framing the channel as the sort of corporate “profit machine” she has railed against.

“Hate-for-profit works only if there’s profit, so Fox News balances a mix of bigotry, racism, and outright lies with enough legit journalism to make the claim to advertisers that it’s a reputable news outlet,” Ms. Warren wrote. “It’s all about dragging in ad money — big ad money.”

“A Democratic town hall gives the Fox News sales team a way to tell potential sponsors it’s safe to buy ads on Fox,” she continued. “I won’t ask millions of Democratic primary voters to tune into an outlet that profits from racism and hate.”