Last fall, as retired Lt. Gen. Mike Flynn traveled the country stumping for Donald Trump, his business partner holed up in a small Washington hotel room with the former head of Turkish military intelligence to work on a special project.

The hotel room meeting was filmed as part of a documentary the Flynn Intel Group was producing for a Turkish businessman, who paid $530,000 to the lobbying shop to polish the country’s image after a botched military coup. That contract has landed Gen. Flynn in legal jeopardy.

The unfinished, never-distributed film, details of which haven’t been previously reported, appears to represent the core of the Flynn Intel Group’s work for Turkish interests.

The contract is at the heart of an expanding investigation into Mr. Flynn’s business dealings. In February the retired three-star general was forced to resign, under fire over his conflicting statements about his contacts with Russian officials before the inauguration, after 24 days as Mr. Trump’s national security adviser.

Mr. Flynn didn’t disclose to the federal government until March that his company was paid to represent Turkish interests. He is now facing military, congressional and criminal investigations into allegations that he improperly concealed his financial ties to Turkey and Russia, and into whether the ties played any role in his decisions as the president’s adviser.