Shinichi, Ran, Sonoko and Eri travel to a remote area in the mountains where there is a legend of a large Otori bird, similar to shrikes, that takes people and make them its "hayanie". A hayanie is when an animal is forcefully stabbed and impaled onto a branch or barbed wire by the Otori bird. While visiting the village, the four meet up with the Wakura family, which consists of a father, two sons, and two daughters. But almost immediately, someone ends up impaled atop God's Perch, a shrine devoted to pleasing the giant Otori, and the village is thrown into chaos. Soon after, another victim surfaces and the telephone lines are cut. The wooden bridge leading from the village to the outside world is even destroyed. It soon becomes apparent that the culprit is targeting the Wakura family, and Shinichi investigates. But the mysteries pile up on each other and the impossible murders get even more puzzling. Just who is the culprit and what is their aim? And how did they accomplish a murder that only a giant shrike appears to be capable of?
The culprit is the policeman, Officer Haji. He decided to take revenge on Isamu Wakura because years ago, he had told his mother to go away, thinking she (who was Haji's mother) loved him for his money.