The former top investment official for the state’s mammoth pension fund landed a cushy gig at a natural gas company after spending millions of dollars at the pension system to snap up the firm’s debt, filings and reports show.

Vicki Fuller, once the state comptroller’s chief investment officer, landed the $275,000-a-year part-time job as a director of the board of the Williams Companies the same week she quit the state job.

Records show that during her six years running the nearly $207 billion pension program, she spent $110 million buying the company’s debt.

The alleged conflict of interest was detailed in a letter that a coalition of environmental activists sent to the state Joint Commission on Public Ethics.

“There’s clearly a perceived conflict of interest here,” said Richard Brooks, an activist with the Brooklyn-based environmental group 350.org.

“We need to get fossil fuels out of our politics and our pension funds.”

The letter and the potential conflict were first reported by WNYC radio, in partnership with the muckraking websites Sludge and Capital & Mail.

According to the complaint, the New York State Common Retirement Fund gobbled up the debt — which was issued by a Williams Companies subsidiary, Williams Partners — while Fuller ran the pension fund.

The fund holds about 1.6 million shares of Williams stock, worth an estimated $48.4 million.

Fuller retired from the Comptroller’s Office at the end of July. Williams announced she was joining its board days later.

While the Comptroller’s Office approved the arrangement, government watchdogs said Fuller should have consulted JCOPE.

JCOPE’s “job is to call balls and strikes and set the boundaries for future employment,” said Blair Horner, director of the New York Public Interest Research Group. “She didn’t do that, and as a result, she finds herself mired in controversy.”

The letter was part of environmentalists’ push to end the state’s investments in fossil-fuel firms. Williams and Comptroller Tom DiNapoli have opposed that push.

DiNapoli’s office said it had reviewed the matter and found no conflicts of interest under the state’s ethics laws.

“The [WNYC] article’s attempt to connect disparate facts paints an inaccurate and conspiratorial portrait that doesn’t reflect reality,” said Matthew Sweeney, a spokesman for DiNapoli.

Officials said the fund voted against several of the company’s directors recently and against its executive-compensation plan.

Fuller hung up on a reporter calling for comment.

The Williams Companies said a “third-party recruitment firm” brought Fuller to its attention and noted she did not meet with company officials until after her retirement was announced in May.

“Her nomination and election to the board were not contingent on her interacting with other investment professionals or institutional investors,” it added.