Officer Frank Dooley is framed for the theft of a television set by two corrupt detectives. He is dismissed from the force, but escapes criminal punishment. The court's next case features hapless defense attorney Norman Kane attempting to defend a white supremacist leader, who threatens him with death should Kane fail to keep him out of prison. Kane reveals his ineptitude and the death threat to the judge, who agrees to render a long sentence if Kane promises to leave law behind. Dooley and Kane meet when they both apply for work at Guard Dog Security, run by Captain Clarence O'Connell and part of a union represented by Klepper and Lazarus. Becoming licensed security guards after a single afternoon of training, Dooley and Kane are made partners by supervisor Maggie Cavanaugh and assigned to night duty at a pharmaceutical warehouse. Ordered to take a lunch break by senior guard Bruno, Kane happens upon an armed robbery of the warehouse and calls Frank for help, but they prove no match for the thieves. The next day, the pair are berated by O'Connell for their failure. While venting their anger toward O'Connell, Maggie reveals that she is his daughter. Dooley and Kane then attend a meeting of the union, where Kane's attempt to file a grievance against Guard Dog is quashed by union president Michael Carlino. Kane pointedly questions Carlino about how the union dues, adding to about $4 million per year, are spent. After Kane rejects an evasive answer from treasurer Lou Brackman, Carlino threatens Kane should he ever attend another union meeting. Over the next few days, Dooley and Kane find themselves assigned to work at a landfill and a toxic waste dump. Convinced something illegal is afoot after hearing a story from two fellow security guards about a similar robbery, the pair track down Bruno at his gym and interrogate him. Bruno admits that it was O'Connell who had him order them to lunch the night of the robbery. They visit an informant friend of Dooley's for information on Carlino and bring their suspicions to Maggie, but she rejects them for having no evidence. Dooley and Kane next attend a party thrown by Carlino in hopes of gathering some evidence. Eavesdropping on a meeting between Carlino and Brackman, they learn of Carlino's use of the pension fund to finance dealings with a drug cartel and his plans to have the money robbed from an armored car, with insurance covering the loss. Fearing an investigation by the insurance company, Brackman urges Carlino not to go through with the robbery. Carlino instructs Klepper and Lazarus to kill Brackman. Dooley and Kane attempt to save Brackman, but are too late to prevent his murder. After a night spent evading police, the two make plans with Maggie to prevent the armored car robbery. Kane and Maggie take over driving the truck, while Dooley plans to meet them ahead of the would-be robbers. Dooley has problems with his motorcycle while weaving through a traffic jam on L.A.'s Sixth Street Viaduct and is forced to hitch a ride with a trucker who bulls through the traffic, destroying several cars in the process. Meanwhile, Kane and Maggie avoid assaults from multiple cars attempting to hold them up. Dooley is able to arrive in time to save the armored car from a final attack from Klepper and Lazarus. O'Connell arrives, having captured Carlino and his associates, the two detectives who originally framed Dooley. The criminals are arrested and Dooley is invited back to the police force, along with a reluctant Kane.
The project was developed by Harold Ramis as a vehicle for Dan Aykroyd and John Belushi. Ramis said it "had died a quiet death, and then was resurrected by Brian Grazer, the producer. And Brian said, "If I can find a director, can I make the movie?" And I said okay." John Candy and Tom Hanks were cast, but Hanks dropped out, and Candy recommended Eugene Levy, his costar in Second City Television and Going Berserk, to replace Hanks. John Carpenter was initially attached to direct, according to Candy. Ramis said the film "was not good. I tried to take my name off it. I took my name off in one place", referring to his executive producer credit, which was removed prior to release. Ramis is still credited as a screenwriter, despite his objections.