WASHINGTON—Special counsel Robert Mueller is examining what role, if any, former national security adviser Mike Flynn may have played in a private effort to obtain Hillary Clinton’s emails from Russian hackers, according to people familiar with the matter.

The effort to seek out hackers who were believed to have stolen Mrs. Clinton’s emails, first reported by The Wall Street Journal, was led by a longtime Republican activist, Peter W. Smith. In correspondence and conversations with his colleagues, Mr. Smith portrayed Mr. Flynn as an ally in those efforts and implied that other senior Trump campaign officials were coordinating with him, which they have denied. He also named Mr. Flynn’s consulting firm and his son in the correspondence and conversations.

The special counsel is investigating potential coordination between Donald Trump’s presidential campaign and Russia in the 2016 election.

Mr. Smith believed that some 33,000 emails that Mrs. Clinton said were personal and had been deleted had been obtained by hackers. Last year, in the final months of the presidential campaign, he made contact with what he said were five groups of hackers, two of which he believed were comprised of Russians, who claimed to have obtained the emails.

“We knew the people who had these were probably around the Russian government,” Mr. Smith told the Journal in an interview in May.