Gavilan is based on Robert Souza, who was a homicide detective in the LAPD Hollywood Division and moonlighted as a real estate broker in his final ten years on the job. The scene where a cuffed crook steals the gun from a patrol officer's belt and starts shooting it off in the parking lot actually happened during Souza's tenure.
The subplot of Gavilan trying to sell Jerry Duran's house to Julius Armas is based on Robert Souza's real-life attempt to sell Robert Evans' house to Dodi Fayed, who was in the music business at the time and for whom Souza did bodyguard work.
According to the DVD commentary the roles that Harrison Ford and Josh Hartnett play in the movie are almost reversed in real life. Gavilan (Ford) is a good shot and almost a stunt driver. Calden is a lousy shot and driver. In reality Ford does not like guns and is a very poor shot at best while Hartnett is a very good marksman, having been through actor basic training for two other movies (Pearl Harbor (2001), Black Hawk Down (2001)) twice. Hartnett on the other hand does not like to drive while Ford is, according to Ron Shelton, "...a maniac behind the steering wheel".
Ron Shelton said that, according to the source material he worked with, K.C. Calden leaving the screenplay at Jerry Duran's house was based loosely on a real event. A police officer and aspiring screen writer was sent to a house to investigate a crime. When he learned that the homeowner was a film producer, the officer ran out to his car, brought in a screenplay he'd been working on and gave it to the producer!
Ron Shelton mentions two scenes that were cut from the movie: an early scene where Ruby breaks up with former boyfriend Bennie Macko, because Shelton thought this was giving too much information too soon and would've ruined the shocked look on Gavilan's face when he learns that Macko used to date Ruby; and a more explicit love scene between Gavilan and Ruby (a side profile of her breast appears to have been edited out) to achieve a PG-13 rating.