Elizabeth (Reese Witherspoon) is a hardworking and dedicated medical resident who, after 20 hours on duty, is heading home when she falls asleep at the wheel of her car and is involved in a fatal auto accident. Several weeks later, a man named David (Mark Ruffalo) takes over the lease on Elizabeth's apartment, but he discovers that she hasn't quite vacated the building. Elizabeth's body may be dead, but her spirit is still quite lively, and her ghost is insisting that the apartment is still hers...and that she wants him to move out. David brings in Darryl (Jon Heder), an eccentric man who claims to have psychic powers, to help sweep Elizabeth's spirit out of the apartment, but she refuses to budge, certain that she can't be completely dead, despite all evidence to the contrary. As Elizabeth and David try to share the flat, they discover that their differences aren't as great as they once imagined, and they become attracted to one another.