In the Heat of the Night was filmed in Sparta, Illinois—not the South at all. Sidney Poitier, the film’s estimable black star, then at the height of his career, refused to shoot below the Mason-Dixon Line, and especially in Mississippi, on his last visit to which he and Harry Belafonte had had a run-in with the local Ku Klux Klan. Knowing that fact somehow adds to In the Heat of the Night’s sense of unsettling realism. […] I can’t help but also notice certain western tropes piling up in the opening minutes, from Tibbs as the stranger who’ll bring justice to the community, to the Main Street that’s as eerie in its nighttime abandonment as any thoroughfare in a desert outpost—all that’s missing are tumbleweeds. […] There’s a sense in which that can be seen as a lazy rehashing of the old liberal Hollywood dependency on the unthreatening hypercompetence of morally upright blacks, but the film distorts that boring trope with a dose of class[:] his class advantage is one of the unspoken but clear affronts to the white characters of In the Heat of the Night, and one of the funny little pivots the film makes away from the message-movie template. […] James Baldwin, who, in his book-length piece of film criticism, The Devil Finds Work, likens the final scene between Steiger and Poitier on the train platform to a classic Hollywood “fade-out kiss.”
— K. Kaustin Collins (Criterion)
Synopsis: African-American Philadelphia police detective Virgil Tibbs is arrested on suspicion of murder by Bill Gillespie, the racist police chief of tiny Sparta, Mississippi. After Tibbs proves not only his own innocence but that of another man, he joins forces with Gillespie to track down the real killer. Their investigation takes them through every social level of the town, with Tibbs making enemies as well as unlikely friends as he hunts for the truth.