The speech was a riveting moment in an already remarkable campaign, coming just before Mr. Trump appeared in West Palm Beach, Fla., to angrily denounce as “false smears” news reports in which several women said he had made unwanted advances on them.

The New Hampshire rally was Mrs. Obama’s sixth campaign appearance for Mrs. Clinton in a month, and the first lady broke from her usual approach and did not speak about Mrs. Clinton’s qualifications for the presidency until halfway through her speech. She said the former secretary of state “embodies so many of the values that we try hard to teach our young people,” and ticked off highlights from Mrs. Clinton’s résumé, saying that any parent would be proud to raise a daughter like her.

But she also sought to appeal to those unenthusiastic about Mrs. Clinton or politics itself, issuing a call to voters across the political spectrum who have been alienated by a contest dominated by outrageous statements and partisan rage.

“We simply cannot endure this, or expose our children to this any longer — not for another minute, and let alone for four years,” Mrs. Obama said. “This has got to stop right now.”

She argued that even voters repulsed by the tone of the campaign — “we are drowning in it,” she said at one point — must consider the norms of behavior they wanted to instill in their children.

“In our hearts, we all know that if we let Hillary’s opponent win this election, then we are sending a clear message to our kids that everything they’re seeing and hearing is perfectly O.K. We are validating it. We are endorsing it,” Mrs. Obama said. “We’re telling our sons that it’s O.K. to humiliate women. We’re telling our daughters that this is how they deserve to be treated. We’re telling all our kids that bigotry and bullying are perfectly acceptable in the leader of their country.”

Instead, she framed the decision to vote for Mrs. Clinton as akin to a woman’s choice to speak out in the face of sexual mistreatment or violence.

“We need to recover from our shock and depression and do what women have always done in this country,” Mrs. Obama said. “We need you to roll up your sleeves. We need to get to work.”