Arthur Kirkland (Al Pacino), a defense attorney in Baltimore, is in jail on a contempt of court charge after punching Judge Henry T. Fleming (John Forsythe) while arguing the case of Jeff McCullaugh (Thomas G. Waites). McCullagh was stopped for a minor traffic offence, but then mistaken for a killer of the same name and has already spent a year and a half in jail; Fleming has repeatedly stymied Kirkland's efforts to have the case reviewed. Though there is strong new evidence that Jeff is innocent, Fleming refuses McCullaugh's appeal due to its late submission and leaves him in prison. After being released, Arthur takes another case, that of a transgender Ralph Agee (Robert Christian), arrested for small crime and becoming a victim of the legal system.
Arthur pays regular visits to his grandfather Sam (Lee Strasberg) in a nursing home, who is progressively becoming senile. It is revealed that Arthur was abandoned by his parents at a young age, and it was Sam who raised him and put him through law school. Arthur also begins a romance with a legal ethics committee member, Gail Packer (Christine Lahti). Arthur has a friendly relationship with Judge Francis Rayford (Jack Warden), who takes him on a hair-raising ride in his personal helicopter, laughing as he tests how far they can possibly go without running out of fuel, while a terrified Arthur begs him to land. Rayford, a veteran of the Korean War, is borderline suicidal and keeps a rifle in his chambers at the courthouse, a 1911 pistol in his shoulder holster at all times, and eats his lunch on the ledge outside his office window, four stories up.
One day, Arthur is unexpectedly requested to defend Fleming, who has been accused of brutally assaulting and raping a young woman. As the two loathe each other, Fleming feels that having the person who publicly hates him argue his innocence will be to his advantage. Fleming blackmails Kirkland with an old violation of lawyer-client confidentiality, for which Arthur will likely be disbarred if it were to come to light.
Arthur's friend and partner, Jay Porter (Jeffrey Tambor), is also unstable. He feels guilt from gaining acquittals for defendants who were truly guilty of violent crimes, showing up drunk at Arthur's apartment when one commits another murder after his acquittal. After a violent breakdown at the courthouse, throwing plates at people, Jay is taken to a hospital. Before leaving in the ambulance, Arthur asks Warren Fresnell (Larry Bryggman), another partner, to handle Ralph's court hearing in his absence. Arthur gives Warren a corrected version of Ralph's probation report and stresses that it must be shown to the judge so that Ralph will get probation rather than jail time.
Unfortunately, Warren fails to appear on time and Ralph is sentenced to jail. Arthur is livid and attacks Warren's car. When Warren argues that Ralph's trial was nothing but "nickels and dimes" and beneath him, Arthur reminds him that "they're people" and then reveals that 30 minutes after he was sentenced, Ralph hanged himself. Meanwhile, Jeff, sexually and physically abused by other inmates, finally snaps and takes two hostages. Arthur pleads with him to surrender, promising to get him out, but a police sniper shoots and kills Jeff when he moves in front of a window.
A clearly disturbed Arthur takes on Fleming's case. He tries to talk the prosecuting attorney, Frank Bowers (Craig T. Nelson) into throwing the case out but Bowers, who recognizes the prestige that convicting a judge would earn him, refuses to back down. Arthur meets with another client, Carl, who gives him photographs that show Fleming engaged in BDSM acts with a prostitute. Gail warns him not to betray a client, revealing that the ethics committee has been keeping their eye on him ever since the contempt of court incident. He shows the pictures to Fleming, who freely admits he is guilty of the rape.
As the trial opens, Fleming makes a casual remark to Arthur about wanting to rape the victim again, which pushes an already disgusted Arthur to a breaking point. In his opening statement, Arthur begins by mocking Bowers' case while speculating on the ultimate objective of the American legal system. He appears to be making a strong case to exonerate Fleming but unexpectedly bursts out and says that the prosecution is not going to get Fleming, because he is going to get him and declares that his client is guilty.
Rayford shouts that Arthur is "out of order," to which Arthur retorts, "You're out of order! You're out of order! The whole trial's out of order!" Arthur is dragged out of the courtroom, venting his rage all the way and condemning Fleming for his and the legal system's abuse of the law. As the courtroom spectators (including Gail) cheer for Arthur, Fleming sits down in defeat, and a fed-up Rayford storms out.
In the end, Arthur sits on the courthouse's steps, knowing his antics will probably cost him his career in law. A supposedly cured Jay passes by and tips his wig to Arthur in greeting, leaving him sitting on the steps in disbelief.
The film was filmed in Baltimore, including the courthouse area, the Washington Monument of the Mount Vernon district, and Fort McHenry. Pacino practiced the "You're out of order!" scene 26 times at the building ledge.
...And Justice for All opened to critical acclaim and box office success. Produced on a modest budget of $4 million, it grossed over $33.3 million in North America, making it the 24th highest-grossing film of 1979. The film received mostly positive reviews from critics, earning an 81% "Fresh" rating on the review aggregate website Rotten Tomatoes based on 26 reviews. Brian W. Fairbanks in the book The Late Show called the film's screenplay "overly contrived", despite Pacino's "trademark" phrase in the courtroom. Out of 30 points, Zagat gave the film 23 overall, acting 26, and story and production 22 each. (20–25 represents "very good to excellent"; 26–30 represent "extraordinary to perfection".) The Empire magazine called it a "solid but slightly clichéd courtroom drama" and rated it three stars out of five.
Kirkland's opening courtroom statement in the film ending, including the whole phrase, "You're out of order! You're out of order! The whole trial is out of order! They're out of order!", has been often discussed. Filmsite named the ending one of the Best Film Speeches and Monologues. MSN Canada noted that the whole phrase is one of the top 10 "misquoted movie lines".
The film received two Academy Award nominations, for Best Actor in a Leading role (Pacino) and for Best Original Screenplay (Curtin and Levinson). Pacino also received a Golden Globe nomination for his performance.
The line "You're out of order! You're out of order! The whole trial is out of order! They're out of order!" has been parodied many times in popular media.
Homer Simpson's bedroom rant to Marge in The Simpsons episode "Secrets of a Successful Marriage" is a parody mishmash of four popular films: ...And Justice for All, A Few Good Men, Patton, and Chinatown. He says: "Look, Marge, you don't know what it's like. I'm the one out there every day putting his ass on the line. And I'm not out of order! You're out of order. The whole freaking system is out of order. You want the truth? You want the truth?! You can't handle the truth! 'Cause when you reach over and put your hand into a pile of goo that was your best friend's face, you'll know what to do! Forget it, Marge, it's Chinatown!"