In 1923, Caroll John Daly wrote Knights of the Open Palm. Published June of that same year in the pulp magazine Black Mask, its protagonist was Race Williams, an acerbic private eye. This was the first hardboiled crime story, and it touched off a world of crime fiction. That same year, trumpeter Louis Armstrong recorded for the first time, and that touched off a world as well. There was no connection to speak of, except that each is an important first.
The golden age of film noir is basically 1941 (The Maltese Falcon being the first classic) to 1958 (Touch of Evil being the last). Most of the music for those films was not jazz, but rather modernistic orchestral music. Jazz on film was generally relegated as source music (the stuff that comes off of jukeboxes, radios etc in the scene).