James K. Kallstrom, the F.B.I. official in New York who tracked down terrorists, mobsters, and swindlers but who will probably be best remembered for his criminal inquiry into the explosion that blew apart Trans World Airlines Flight 800, said yesterday that he would retire from the bureau to take a job in the private sector.

The 54-year-old ex-marine said he would probably have retired earlier had it not been for the lengthy investigation into the Flight 800 disaster, which killed all 230 people on board. Strongly suspecting that the cause was a bomb or missile, Mr. Kallstrom led an exhaustive investigation that lasted 16 months and involved more than 1,000 agents. Ultimately, he said, the investigation disproved his initial hunches.

At a news conference last month, Mr. Kallstrom, an assistant director of the F.B.I. in charge of the New York office, said the bureau had ruled out a bomb, missile, or sabotage as a cause of the July 17, 1996, explosion, and rejected the suggestion that the bureau took too long in its criminal investigation or had failed to work well with the National Transportation Safety Board.

''Imagine the notion of us looking for the obvious things in an investigation and not finding them and sort of vacating the scene,'' Mr. Kallstrom said at the time. ''We're the Federal Bureau of Total Investigation,'' he added, ''not the Federal Bureau of the Obvious.''