WASHINGTON — Michael T. Flynn told President Trump’s transition team weeks before the inauguration that he was under federal investigation for secretly working as a paid lobbyist for Turkey during the campaign, according to two people familiar with the case.

Despite this warning, which came about a month after the Justice Department notified Mr. Flynn of the inquiry, Mr. Trump made Mr. Flynn his national security adviser. The job gave Mr. Flynn access to the president and nearly every secret held by American intelligence agencies.

Mr. Flynn’s disclosure, on Jan. 4, was first made to the transition team’s chief lawyer, Donald F. McGahn II, who is now the White House counsel. That conversation, and another one two days later between Mr. Flynn’s lawyer and transition lawyers, shows that the Trump team knew about the investigation of Mr. Flynn far earlier than has been previously reported.

His legal issues have been a problem for the White House from the beginning and are at the center of a growing political crisis for Mr. Trump. Mr. Flynn, who was fired after 24 days in the job, was initially kept on even after the acting attorney general, Sally Q. Yates, warned the White House that he might be subject to blackmail by the Russians for misleading Vice President Mike Pence about the nature of conversations he had with the Russian ambassador to Washington.

After Mr. Flynn’s dismissal, Mr. Trump tried to get James B. Comey, the F.B.I. director, to drop the investigation — an act that some legal experts say is grounds for an investigation of Mr. Trump for possible obstruction of justice. He fired Mr. Comey on May 9.

The White House declined to comment on whether officials there had known about Mr. Flynn’s legal troubles before the inauguration.

Mr. Flynn, a retired general, is one of a handful of Trump associates under scrutiny in intertwined federal investigations into their financial links to foreign governments and whether any of them helped Russia interfere in the presidential election.

In congressional testimony, the acting F.B.I. director, Andrew G. McCabe, has confirmed the existence of a “highly significant” investigation into possible collusion between Mr. Trump’s associates and Russian operatives to sway the presidential election. The pace of the investigations has intensified in recent weeks, with a veteran espionage prosecutor, Brandon Van Grack, now leading a grand jury inquiry in Northern Virginia that is scrutinizing Mr. Flynn’s foreign lobbying and has begun issuing subpoenas to businesses that worked with Mr. Flynn and his associates.

The New York Times has reviewed one of the subpoenas. It demands all “records, research, contracts, bank records, communications” and other documents related to work with Mr. Flynn and the Flynn Intel Group, the business he set up after he was forced out as chief of the Defense Intelligence Agency in 2014.

The subpoena also asks for similar records about Ekim Alptekin, a Turkish businessman who is close to President Recep Tayyip Erdogan of Turkey and is chairman of the Turkish-American Business Council. There is no indication that Mr. Alptekin is under investigation.

Signed by Dana J. Boente, the United States attorney for the Eastern District of…