After more squabbling in which Trump accused Schumer of letting funding lapse earlier this year, the president said he would take the blame for a shutdown over immigration.
"If we don't get what we want, one way or the other, whether it's through you, through military, through anything you want to call, I will shut down the government," Trump said, as Schumer sat staring forward and not meeting the president's eyes.
"We disagree," Schumer responded.
"I am proud to shut down the government for border security, Chuck. … I will take the mantle. I will be the one to shut it down," the president said.
Through the whole argument, Vice President Mike Pence sat in a chair next to Trump without uttering a word.
In a joint statement after the meeting, Schumer and Pelosi said "we gave the president two options that would keep the government open. It's his choice to accept one of those options or shut down the government."
Pelosi and Schumer saw it as a victory that Trump admitted he would own a shutdown. After departing the White House, Pelosi talked to Democratic House members at a meeting, telling them the Democrats got Trump "to fully own that the shutdown was his," according to an aide in the room. She called the admission "an accomplishment."
She said the meeting was "wild," adding that she was "trying to be the mom" during the argument.
"It goes to show you: you get into a tickle contest with a skunk, you get tinkle all over you," Pelosi told lawmakers.
She also said the border wall "is like a manhood thing for [Trump.] As if manhood could ever be associated with him."
The meeting was the second time Tuesday that Trump suggested the military could construct the wall. It is unclear how that would happen, since Congress already passed a Defense Department spending bill without border wall funding.
In a statement, Pentagon spokesman Lt. Col. Jamie Davis said "to date, there is no plan to build sections of the wall."
"However, Congress has provided options under Title 10 U.S. Code that could permit the Department of Defense to fund border barrier projects, such as in support of counter drug operations or national emergencies," Davis said.
Democrats and even some Republicans oppose Trump's proposed barrier. Pelosi and Schumer have called it inhumane and ineffective. In a statement Monday night, the Democrats said "the president knows full well that his wall proposal does not have the votes to pass the House and Senate, and should not be an obstacle to a bipartisan agreement."
Trump has played up the wall to excite his supporters. He has called immigration a "total winner" politically.
Hours after the meeting on Tuesday afternoon, Trump again said he would own a shutdown. He told reporters that "I actually like that in terms of an issue" if "we have to close down the country over border security."
"We're closing it down for border security and I think I win that every time," he said.
Trump spent the final days before November's midterm elections stoking concerns about a so-called caravan of migrants heading toward the U.S.-Mexico border. Republicans lost 40 House districts and their majority in the chamber, while they gained two seats in the Senate.
Pelosi has her own political considerations in the funding fight. She needs votes from some skeptical Democrats in her bid to become speaker next month. Much of her caucus is adamantly opposed to border wall funding.
If funding lapses, it would be the third government shutdown this year.
— CNBC's Patti Domm and Amanda Macias contributed to this report
Subscribe to CNBC on YouTube.