Boston Police Department officers Detective Sergeant Nick Walker and Detective Lieutenant Bobby Hayes discover and steal several shards of gold while on duty. Nick buries his share under an orange tree sapling in his garden; his wife, Julia, thinks that the tree is a surprise gift and mentions how content she is with their life together. Nick realizes that they do not need the gold, and decides to submit it as evidence. During a subsequent raid, Hayes, dissatisfied with Nick’s stroke of conscience, kills him.
In the afterlife, as penance for his thievery, Nick is recruited for the R.I.P.D. (The Rest In Peace Department). The R.I.P.D. is responsible for finding souls who refuse to move on to the afterlife, becoming “deados”, monsters disguised as humans. He is partnered with Roycephus “Roy” Pulsipher, a former U.S. Marshal and participant in the American Civil War. On his first field mission, Nick aids Roy in interrogating a suspected deado, whereupon Nick discovers the perpetrator in possession of shards of gold like those he and Hayes had discovered. On their way they stop at a cemetery to watch his funeral, where Nick attempts to make his presence known to Julia but is not recognized, because R.I.P.D. officers are given new identities and appearances to prevent them revealing that the afterlife exists.
Nick dupes one of Roy’s informants into revealing Hayes as his contact. They follow Hayes to Nick’s old house, where he “discovers” Nick’s stolen gold. After arguing over the gold, R.I.P.D. Chief Mildred Proctor receives orders to remove them from the case and from active duty due to this exposure. Proctor learns from Eternal Affairs that the gold could be used to construct the Staff of Jericho, which will reverse the flow of souls from earth to the afterlife.
After Nick and Roy make amends, they decide to work together to stop whatever Hayes is planning. They discover that Hayes is a deado and arrest him, but a confiscated item of his freezes the whole department, and Hayes and a group of deados escape with the remainder of the gold. They assemble the Staff of Jericho, and Hayes takes Julia hostage and stabs her as a necessary human sacrifice to activate the staff. A battle ensues; Pulsipher destroys the Staff of Jericho, and Nick exacts his revenge on Hayes. Close to death, Julia sees Nick for who he is; and they share a tearful farewell.
Later, Proctor informs Nick that Julia will live. She reinstates them both fully, though she adds 53 years to Roy’s term in the R.I.P.D. As a reward, Roy gives Nick a new appearance, but he is dismayed to find it is that of a Girl Scout.