WASHINGTON — Federal prosecutors in Virginia are investigating a secret Turkish lobbying effort that once involved Michael T. Flynn, the former national security adviser, even as Mr. Flynn’s role in the special counsel’s investigation winds down, according to people familiar with the inquiry.

Robert S. Mueller III, the special counsel, had been handling the case and at some point referred it back to prosecutors in Alexandria, Va., who had originally opened the investigation, the people said. A veteran national security prosecutor is overseeing the case, and a grand jury has been empaneled to hear evidence.

Prosecutors for Mr. Mueller appeared to make reference to the investigation in documents released on Tuesday that enumerated Mr. Flynn’s cooperation in the Russia inquiry. The heavily redacted documents created an air of mystery about Mr. Flynn’s “substantial help” in several unspecified but continuing investigations. Prosecutors cited Mr. Flynn’s assistance as grounds for leniency when a judge sentences him on Dec. 18.

The Turkey case appears to fit as one of those inquiries because Mr. Flynn has direct knowledge of aspects under scrutiny. Prosecutors are examining Mr. Flynn’s former business partners and clients who financed a campaign against Fethullah Gulen, a cleric living in Pennsylvania whom the Turkish government has accused of helping instigate a failed coup.