In Sparta, Mississippi, one hot September night, the murdered body of wealthy industrialist Philip Colbert is found in an alley. Hunting for suspects, the police pick up Virgil Tibbs, a well-dressed black man, and bring him to headquarters for questioning. To the consternation of police chief Bill Gillespie, Tibbs turns out to be a top homicide detective from Philadelphia, who has been in town visiting his mother. Ordered by his superior in Philadelphia to assist with the case, Tibbs conducts the postmortem examination and thus displays his superior knowledge of criminology. Though enraged, Gillespie reluctantly acquiesces in Tibbs's findings. As the investigation gets underway, Gillespie accuses young Harvey Oberst of the murder when he catches him with the dead man's wallet, but Tibbs quickly proves that Oberst stole the wallet after he found the body. Tibbs, for his part, is so determined to establish the guilt of Eric Endicott, an influential but insolent and bigoted conservative who opposed Colbert's progressive plans for a modern factory, that he too makes a false accusation. Gradually, as Tibbs and Gillespie combine their efforts, a grudging tolerance develops between them. After Gillespie has wrongly charged his own deputy, Sam Wood, with the murder, the local tease, Delores Purdy, is dragged into the police station by her brother, who claims that she is pregnant by Wood. Upon learning about an abortionist called Mama Caleba, Tibbs visits the woman and is still with her when Delores arrives, accompanied by the actual father of her child, diner counterman Ralph Henshaw. Tibbs confronts him, and Henshaw confesses that he murdered Colbert to obtain the money for Delores' abortion. With the case closed, Gillespie drives Tibbs to the railway depot. The two men shake hands in acknowledgment of the mutual respect that has grown between them.