He gave no details on why she is stepping down.
A protégé of former White House chief of staff John Kelly, Nielsen had reportedly fallen out of favor in recent months with the president, who has been frustrated with an unprecedented flow of Central American families reaching the U.S. -Mexico border.
President Donald Trump immediately replaced her with Customs and Border Protection Commissioner Kevin McAleenan, a longtime border official who is well-respected by members of Congress and within the administration. "I have confidence that Kevin will do a great job!" She was clearly aware that the president was unhappy with her.
The meeting "did not go well", a source close to the White House said. She had repeatedly said Russia was to blame for meddling in the 2016 presidential elections while not explicitly supporting special counsel Robert Mueller's investigation into Russian interference.
Mr. Trump and Stephen Miller, his top immigration adviser, have privately but regularly complained about Ms. Nielsen. Nielsen faced more public pressure after the Trump administration enacted a policy of family separation that resulted in thousands of migrant children being separated from their parents, which the president ultimately reversed.
Brunei-owned hotels delete social media platforms amid backlash
Celebrities including George Clooney , Ellen DeGeneres , and Elton John have called for a boycott of the country's interests. This is not the first time Hollywood has called for a boycott of the two hotels because of Brunei's punitive legal system.
Trump's frustrations were placed on Nielsen's head, the Washington Post reported.
When Kelly moved to the West Wing as chief of staff, Nielsen followed, becoming a deputy chief of staff tasked with helping Kelly bring rigor to a freewheeling staff.
Her replacement, McAleenan, has helped shape numerous administration's policies to date and is considered highly competent by congressional leaders, the White House and Homeland Security officials.
He insists that the arrival of immigrants across the southern US border constitutes a national emergency.
Nielsen served under President George W. Bush in the Transportation Security Administration and on the Homeland Security Council, where she oversaw disaster preparedness and response. On a number of occasions, she indicated she didn't believe the Russians specifically tried to help Trump, despite intelligence community conclusions that they did.
Most notably, however, she has become the face of the Trump administration's fierce anti-immigration policy.