The scene in the coffee shop was improvised. On the DVD commentary, Spike Lee states that when Denzel Washington ad-libbed the line "I'll bet you can get a cab though," he nearly ruined the take by laughing so loud at Washington's line.
According to Spike Lee, he and Willem Dafoe met in the men's room during the intermission of the play 'Julius Caesar', in which Denzel Washington appeared. As they were standing side by side in the men's room, Spike said: "We should work together" and Dafoe replied: "Yeah, Spike, we should" and that was it. Later on, Spike sent him the script.
The interrogation scenes were mostly ad-libbed.
The scene in which the boy shows Dalton the video game he is playing on his PSP was not in the original script. Director Spike Lee added it to "make a comment on gangster rap's infatuation with violence." The game is not real, but was created by an animation house. Lee asked them to come up with animation for "the most violent game ever".