Bill Gates’ former science adviser, Boris Nikolic, has formally said he won’t serve as one of the three executors of Jeffrey Epstein’s estate, according to new court papers.

The 49-year-old biotech venture capitalist — who said last month he was “shocked” to hear he was appointed to be the successor executor — turned down the position in a “Declination to Serve as Successor Executor” filed Thursday in the multi-millionaire’s estate case, in probate court in St. Thomas, Virgin Islands.

Nikolic would have only needed to step up to the task if the executors of Epstein’s estate, long time employees Darren Indyke and Richard Kahn, had been unable to serve.

After the details of the convicted pedophile’s will were exclusively reported by The Post, Nikolic responded in a statement: “I was not consulted in these matters and I have no intent to fulfill these duties, whatsoever.”

Epstein — a former hedge-fund manager — signed his will two days before he committed suicide by hanging in a lower Manhattan jail cell last month leaving behind a $578 million fortune to a trust.

It wasn’t clear how close Epstein and Nikolic had been. But Nikolic was excited about advice Epstein — who was fascinated with genetic research — had given to bankers about the public offering of a gene company that Nikolic had a $42 million stake in, Bloomberg reported at the time.

Nikolic could not immediately be reached for comment. Lawyers for Epstein’s estate did not immediately return a request for inquiry.