After returning from the set of Drive, He Said, Robert Towne began adapting Darryl Ponicsan's novel. The screenwriter tailored the script for Jack Nicholson and Rupert Crosse. In adapting the novel, Towne removed Buddusky's "closet intellectualism and his beautiful wife". The screenwriter also changed the ending so that Buddusky lives instead of dying as he does in the book. Gerald Ayres convinced Columbia Pictures to produce the film based on his consultant's credit on Bonnie & Clyde and sent Towne's script to Robert Altman and then Hal Ashby. Ayres remembers, "I thought that this was a picture that required a skewed perspective, and that's what Hal had". Ashby initially turned it down but after reading the script a second time agreed to do the film. Columbia did not like Ashby because he had a reputation of distrusting authority and made little effort to communicate with executives. The budget was low enough for him to get approved.
The studio objected to the number of curse words in the script. Peter Guber recalls, "The first seven minutes, there were 342 'fucks'". The head of Columbia asked Towne to reduce the number of curse words to which the writer responded, "This is the way people talk when they're powerless to act; they bitch". He refused to change a word and Nicholson backed him up.
The project stalled for 18 months while Nicholson made The King of Marvin Gardens. Guber told Ayres that he could get Burt Reynolds, Jim Brown, and David Cassidy and a new writer and he would approve production immediately. Ayres rejected this proposal and the studio agreed to wait because they were afraid that the producer would take the film to another studio.
During pre-production, Ashby was busted for possession of marijuana while scouting locations in Canada. This almost changed the studio's mind about backing the project but the director's drug bust was not widely reported and Nicholson remained fiercely loyal to him, which was a deciding factor. Just as the film was about to go into production, Crosse was diagnosed with terminal cancer. Ashby postponed principal photography for a week to allow Crosse to deal with the news and decide if he still wanted to do the film. The actor decided not to do the film and Otis Young replaced him. Originally, Towne envisioned the character of Larry Meadows as a "helpless little guy", but Ashby wanted to cast Randy Quaid in the role, who was 6'4". Towne remembers thinking, "There's a real poignancy to this huge guy's helplessness that's great. I thought it was a fantastic choice, and I'd never thought of it". Haskell Wexler was supposed to shoot The Last Detail but he could not get a union card for an East Coast production so Ashby promoted his camera operator, Michael Chapman to director of photography. Principal photography began in November 1972.
Editor Bob Jones cut the film with Ashby at the filmmaker's home. The process took an unusually long time as the director agonized over all the footage he had shot. Ashby would ignore phone calls from Columbia and eventually executives higher and higher up the corporate ladder tried to contact him until the head of physical production threatened to take the film away. Jones contacted Ashby, who was in London, England at the time, and he told the executives to back off. Towne occasionally visited Ashby's house to check in and did not like the pacing of the film. According to Towne, Ashby "left his dramatizing to the editing room, and the effect was a thinning out of the script". During the editing process, Columbia hated the jump cuts Ashby employed.
The Last Detail received several positive reviews during its original run. It currently has a 90% rating on Rotten Tomatoes. Vincent Canby, in his review for the New York Times, wrote, \"It's by far the best thing he's ever done\", referring to Nicholson's performance. Variety also praised Nicholson, writing that he was \"outstanding at the head of a superb cast\".