Midnight Run

Bounty hunter Jack Walsh (De Niro) is enlisted by bail bondsman Eddie Moscone (Pantoliano) to bring accountant Jonathan "The Duke" Mardukas (Grodin) back to L.A. The accountant had embezzled $15 million from Chicago mob boss Jimmy Serrano (Farina) before skipping the $450,000 bail Moscone has posted for him. Walsh must bring Mardukas back within five days, or Moscone defaults. Moscone says the job is easy, a "midnight run," but Walsh demands $100,000. Walsh is then approached by FBI Agent Alonzo Mosely (Kotto), who wants Mardukas to be a witness against Serrano and orders Walsh to keep away from Mardukas, but Walsh takes no notice and instead steals Mosely's ID, which he uses to pass himself off as an FBI agent along his journey. Serranoâs henchmen Tony (Richard Foronjy) and Joey (Miranda) offer Walsh $1 million to turn Mardukas over to them, but he turns them down.
Walsh takes custody of Mardukas in New York and calls Moscone from the airport, not knowing that Moscone's line is tapped by the FBI and his assistant Jerry (Jack Kehoe) is secretly tipping Serrano's men off. However, Mardukas fakes a panic attack on the plane, forcing him and Walsh to travel via train. When Walsh and Mardukas fail to show up, Moscone brings in rival bounty hunter Marvin Dorfler (Ashton) to find them. Walsh gets the drop on Dorfler and leaves the train, but without funds, he is forced to rely on other means to get across the country, including stealing cars, borrowing his ex-wifeâs (Wendy Phillips) car in Chicago, and hitchhiking. Meanwhile, the skirmish on the train reaches Mosely's ears and he leads a task force to find Walsh and Mardukas. Mardukas tries to get to know Walsh, who eventually reveals that, 10 years before, he was an undercover officer in Chicago trying to get close to a drug dealer who had almost the entire force on his payroll. Eventually, just as Jack was going to make the arrest, the drug dealer had some heroin planted in his house by corrupt cops. In order to avoid prison and working for the dealer, Walsh left Chicago and became a bounty hunter, while his wife divorced him and married the corrupt lieutenant who fired him. Since then, however, Walsh has clung to the vain hope that he will one day be reunited with his ex-wife. Later on, Mardukas learns that the drug dealer was Serrano himself.
In Arizona, Dorfler takes Mardukas away from Walsh, who is found by Mosely. While arguing with Moscone over the phone, Walsh realizes that Dorfler intends to turn Mardukas over to Serrano for $2 million. However, Dorfler accidentally reveals to Serrano's men where he is keeping Mardukas, but is knocked unconscious by Serrano's men who go after Mardukas themselves. Walsh calls Serrano's men and bluffs that he has computer disks created by Mardukas with enough information to put Serrano away, but promises to hand the disks over if Serrano returns Mardukas to him unharmed. Jack meets up with Serrano while wearing a wire and being watched by the FBI. Dorfler spots Mardukas and interrupts the exchange, unknowingly disabling the wire. After Serrano takes the disks, the FBI closes in, arresting Serrano and his henchmen. Mosely turns Mardukas over to Walsh with enough time to return him to L.A. by the deadline. However, Walsh realizes that he cannot bring himself to send Mardukas to prison, and lets him go. Before parting, Walsh gives Mardukas a watch that his wife gave him before their marriage, symbolizing that he has finally let go of her. In return, Mardukas gives Walsh $300,000 in a money belt he had been hiding. Walsh flags down a taxi and asks the driver if he has change for a $1,000 bill, but the taxi drives away, so he heads home on foot.

Question: What was Walsh's job ten years ago?
Answer: Undercover cop.