Mr. Trump was different, the president said, and his election would raise questions about the way the country treated women, immigrants and people of different faiths, and could shake the bedrock principles of the Constitution.

“Fundamental values are at stake in this election,” Mr. Obama said. “It has to do with our basic standards of decency.”

“Do we think that government is something serious, that we have an obligation to make sure that to the best of our abilities we leave the country a little bit better off than how we found it?” he asked. “Or do we think that it’s an infomercial or a reality TV show, and we can say anything or do anything without any fidelity to the truth whatsoever, just make stuff up so that at a certain point everything is contested?”

The argument pointed to a division of labor between Mr. Obama and Mrs. Clinton at a crucial moment in the race. While Mrs. Clinton is seeking to make a positive closing argument and appeal to voters across the ideological spectrum, pledging to reach across party lines to govern in the broader interests of the nation, Mr. Obama is taking a more bellicose tack, working fervently to crush whatever is left of Mr. Trump’s chances and hold Republicans to account for his rise.

The campaign has given Mr. Obama an opportunity to settle some scores with Mr. Trump — who first attracted attention in the political realm for suggesting that the president was born in Kenya — and with congressional Republicans who went to great lengths to undermine his agenda on Capitol Hill.

At a rally on Sunday in Las Vegas and again at an evening fund-raiser in the affluent La Jolla enclave here, Mr. Obama sought to bind Republicans running for Congress to Mr. Trump, arguing that their obstructionist ways had fueled the nominee’s political ascent.

Mr. Obama pilloried Representative Darrell Issa of California, one of his administration’s chief tormentors as chairman of the House Oversight and Government Reform Committee, calling him “Trump before Trump.”