Bill Gates is denying a report that he donated $2 million to the Massachusetts Institute of Technology’s Media Lab through pedophile Jeffrey Epstein.

The New Yorker reported on Friday that Epstein secured at least $7.5 million in donations to the prestigious university — including $2 million the dead financier claimed to have solicited from the Microsoft founder.

But a rep for Gates said the money given directly to the university in 2014 wasn’t dedicated to the program that Epstein was fundraising for and Gates’ office wasn’t aware of any discussions between the lab and Epstein about the grant.

The multibillionaire philanthropist’s denial was reported in the New Yorker’s original story, which also included an email exchange between then-Media Lab director Joi Ito and Peter Cohen, who was the lab’s director of development and strategy.

“This is a $2M gift from Bill Gates directed by Jeffrey Epstein,” Ito wrote in a 2014 email to Cohen, who responded, “For gift recording purposes, we will not be mentioning Jeffrey’s name as the impetus for this gift.”

Gates reportedly met with Epstein more than once — even after the former hedge fund manager was convicted of soliciting an underage prostitute in 2008.

A rep for Gates has previously said the two never had an official working relationship.

With Post wires