Flynn insisted he was honored to have served the American people in such a "distinguished" manner.
The White House said Trump had accepted Flynn's resignation amid allegations the retired three star general discussed US sanctions strategy with Russia's ambassador Sergey Kislyak before taking office.
Flynn -- who once headed US military intelligence -- insisted he was honored to have served the American people in such a "distinguished" manner.
But he admitted that he "inadvertently briefed" the now Vice President Mike Pence with "incomplete information" about his calls with Kislyak.
Pence had publicly defended Flynn, saying he did not discuss sanctions, putting his own credibility into question.
"Regarding my phone calls with the Russian Ambassador. I have sincerely apologized to the President and the Vice President, and they have accepted my apology," read Flynn's letter, a copy of which was released by the White House.
The White House said Trump has named retired lieutenant general Joseph Kellogg, who was serving as a director on the Joint Chiefs of Staff, to be interim national security advisor.
Flynn's resignation so early in an American administration is unprecedented, and comes after details of his calls with the Russian diplomat were made public -- upping the pressure on Trump to take action.
Several US media outlets in Monday reported that top Trump advisors were warned about Flynn's contacts with the Russians early this year.
Questions will now be raised about who knew about the calls and why Trump did not move earlier to replace Flynn.
Ahead of Flynn's resignation White House spokesman Sean Spicer insisted Trump was not consulted about Flynn discussing sanctions, nor did he task his top national security aide to do so.
Asked if Trump was aware Flynn would raise sanctions with the Russian envoy, Spicer said: "No, absolutely not. No way."
A former head of defense intelligence, Flynn's encounters with Russian President Vladimir Putin had already drawn criticism.
US media reported on Monday that the Justice Department had warned the White House that Flynn had misled senior administration officials about the contents of his talks with Kislyak, and that it could make him vulnerable to Russian blackmail.
The message was delivered in the last days of Barack Obama's administration by then-acting attorney general Sally Yates -- who Trump sacked after she instructed Justice Department lawyers not to defend his contested travel ban.
CNN said then director of national intelligence James Clapper and John Brennan, the CIA chief at the time, agreed the White House should be alerted about the concerns..
In the hours before his resignation, some Trump aides suggested that Flynn has the full support of the president.
Until now, Flynn had been an instrumental player in Trump's inner circle.
He was an early supporter of Trump's improbable bid for the presidency and has encouraged tougher policies on Iran and a softer policy on Russia.
That was a sharp break with the Obama administration, which introduced a wave of sanctions against Moscow over its annexation of Ukraine's Crimea, support for separatists in eastern Ukraine and what US intelligence says were its attempts to sway the 2016 election in Trump's favor.
Washington and Moscow had also clashed over alleged war crimes in Syria, where Russia is accused of aiding the bombing of hospitals and other civilian targets. Despite this, Flynn had argued for rapprochement.
A few of Trump's fellow Republicans had joined their Democratic foes in urging Flynn to resign over a situation that had become a major embarrassment for the ruling party.
"It is his duty to be fully transparent and forthright in his actions -- anything less is unacceptable," Representative Mike Coffman, a Colorado Republican, said in a statement.
"If in fact he purposely misled the president, he should step down immediately."
Flynn's resignation took place just over three weeks into Trump's presidency and days before his first official talks with Israeli Prime Minister Benjamin Netanyahu, discussions in which the president's national security advisor would normally have a key role.
The Justice Department and Congress are both investigating possible links between Trump campaign advisors and Moscow, and US intelligence has concluded that Putin personally directed an operation to interfere in the US election.
On December 29, the Obama administration sanctioned four Russian individuals and five entities, and expelled 35 Russian diplomats in retaliation.