CLEVELAND — President Obama on Friday implored voters here to “reject a dark and pessimistic vision” offered by Donald J. Trump and urged a robust turnout on behalf of Hillary Clinton in a state where the presidential candidates are locked in a razor-thin contest.

Following by a day Michelle Obama’s deeply personal denunciation of Mr. Trump, the president also assailed the Republican nominee as a morally compromised and intellectually inferior person who fakes his concern for the working class in America.

“The guy spent 70 years on this earth showing no regard for working people,” Mr. Obama said, describing Mr. Trump as a wealthy opportunist who is pretending to be something he has never been. “And then suddenly, he’s going to be the champion of working people? Come on. Come on, man.”

Mr. Obama cited a litany of statements from Mr. Trump as evidence that the Republican nominee is unfit to be president, and said people do not have to be “a husband or a father” to know that Mr. Trump’s comments about women were unacceptable.