Microsoft founder and multibillionaire Bill Gates said Wednesday that he "made a mistake" meeting with convicted sex criminal and wealthy financier Jeffrey Epstein to discuss philanthropy.

Gates, speaking at The New York Times Dealbook Conference in New York, said he thought his discussions with the now-deceased money manager would bring in billions of dollars for his global health efforts.

But "that was a mirage," Gates said. "None of that money ever appeared, and I gave him some benefit by the association, so I made a doubly wrong mistake there."

Epstein, 66, had amassed a long list of famous and wealthy contacts – including Presidents Bill Clinton and Donald Trump – years before he died in a Manhattan federal lockup in August facing charges including sex trafficking of minors and sex trafficking conspiracy. His death was ruled a suicide.

Gates met with Epstein multiple times – including in 2013 while he was the chairman of Microsoft – years after the disgraced financier had struck a plea deal on prostitution-related charges filed by Florida prosecutors in 2008.

Gates told the DealBook audience that his global health initiative is "extremely resource limited." He had told The Wall Street Journal in a prior interview that "there were people around [Epstein] who were saying, hey, if you want to raise money for global health and get more philanthropy, he knows a lot of rich people."

Gates said Wednesday that he takes precautions about the sources of money flowing into his philanthropic efforts, such as the Giving Pledge.

"There's some countries that we just haven't done any recruiting in at all because we're not in a position to really make those judgments," he said.

But he noted that it's difficult to be certain that the money is always perfectly clean.

"I feel bad. We probably will at some point accept someone into the Giving Pledge and it will turn out that their fortune is a disreputable fortune," Gates added. "When you're engaging in this, if you really want to get out there and get more people drawn into philanthropy, there is a risk that you'll make a mistake."

— CNBC's Will Feuer contributed to this report.