Just a day after Mr Trump gave a speech on immigration and national security that included sweeping condemnations of Mr Obama's policies, the president responded with some of his harshest criticisms to date.
"Where does this stop?" Mr Obama asked. "The Orlando killer, one of the San Bernardino killers, the Fort Hood killer - they were all US citizens. Are we going to start treating all Muslim-Americans differently? Are we going to start subjecting them to special surveillance? Are we going to start to discriminate [against] them, because of their faith?"
Such views, Mr Obama said, are "not the America we want".
As the Obama-Trump clash heats up, here are three things to keep in mind.
Donald Trump and Barack Obama have a history that predates the current election cycle. In early 2011 Mr Trump repeatedly circulated conspiracy theories about the authenticity of the president's birth certificate and whether he was actually born in the US.
Later that year, at a black-tie Washington event, Mr Obama relentlessly mocked Mr Trump while the New Yorker sat stone-faced in the audience - a performance the New Yorker's Adam Gopnik said helped motivate Mr Trump to eventually run for president.
Over the past year Mr Trump has questioned Mr Obama's competence and openly speculated about his allegiances in what he labels the war on radical Islam. As recently as Sunday, he cryptically noted that Mr Obama was either "tough, not smart, or he's got something else in mind".
Mr Obama has criticised Mr Trump in the past, but his remarks on Tuesday were the sharpest, most direct of this political season. His tone was stern, his language blunt.
A few hours later, Mr Trump shot back, effectively accusing Mr Obama of treason.
The president, he said in an email to the Associated Press, "continues to prioritise our enemy over our allies, and for that matter, the American people".
The president clearly does not like the presumptive Republican nominee - and the feeling appears to be mutual.
There's very little precedent in modern US political history for a sitting president to directly and sharply criticise the opposing party's standard-bearer in the run-up to a general election.
In part that's because there simply haven't been many two-term presidents in recent memory - George W Bush, Bill Clinton, Ronald Reagan and Dwight Eisenhower are the only ones since World War 2. And of those, only Reagan and Eisenhower left office with high approval and largely free from scandal.
Mr Obama is currently above 50% in most opinion polls and has been trending upward, so he is in a position to be an active and eager participant in the campaign fray. Because he's not the nominee, he has a free hand in what he can say, and he can bring the full weight of the presidency to bear on Mr Trump.
The Republican nominee will be effectively campaigning against two candidates - Mrs Clinton and Mr Obama. And, at least for now, Mr Trump can only count on the tepid support of many of his fellow Republicans. Following Mr Obama's remarks on Tuesday, the Republican National Committee issued a press release that made no mention of Mr Trump or his proposed immigration measures, instead focusing on the Second Amendment and firearm rights.
Beyond the personal and political differences, Barack Obama and Donald Trump represent decidedly different ways of viewing the US role in the world.
Mr Obama preaches engagement, with the US as a piece of larger global puzzle. Mr Trump embraces an "America first" outlook in which international co-operation is largely a zero-sum game.
On trade, Mr Obama backs deals like the Trans-Pacific Partnership, which he argues will increase global prosperity and bind nations together economically. Mr Trump has said it will give American rivals the upper hand - and called an earlier trade agreement, Nafta, " a disaster" that he promises to renegotiate.
Mr Obama argues that immigration is largely beneficial to a diverse nation. Mr Trump sees it as a threat that risks domestic security and economic prosperity.
Attend a Donald Trump rally and you're presented with one view of America - a population that is proud and patriotic, yet economically uneasy and doubtful about the future. Such concerns are captured by Mr Trump's slogan, "Make America Great Again". The nation should be great but has lost its way.
"America is being taken apart piece by piece, auctioned off and just rapidly, auctioned off to the highest bidder," Mr Trump said in his speech after Mrs Clinton clinched the Democratic nomination on 7 June. "Our infrastructure is a disaster. Our schools are failing. Crime is rising. People are scared. The last thing we need is Hillary Clinton in the White House or an extension of the Obama disaster."
Mr Obama, on the other hand, sees a nation that is making progress towards an ideal. One of his favourite quotes is about the "arc of history bending toward justice".  In his view, Mr Trump threatens the progress the nation has made to become more inclusive and welcoming.
"Our diversity and our respect for one another, our drawing on the talents of everybody in this country, our making sure that we are treating everybody fairly, that we are not judging people on the basis of what faith they are or what race they are or what ethnicity they are or what their sexual orientation is, that's what makes this country great," Mr Obama said on Tuesday.
Nearly every election, the politicians involved like to talk about how important the vote will be, how pivotal the moment is, how stark the choices are.
This time, it's not hyperbole.
The political battle between President Barack Obama and presumptive Republican nominee Donald Trump is now fully joined.