Set in the year 2039, Japan is the under the rule of a multinational military force called GHQ after the country went into chaos due to the "Lost Christmas" incident ten years prior to the start of the series, when a giant outbreak of an alien virus called the Apocalypse Virus spreads during Christmas, causing the United Nations to send the GHQ to contain the outbreak and restore order. The series follows Shu Ouma, an intelligent yet socially awkward teenager who finds himself caught in the war between the GHQ and "Funeral Parlor (Undertakers)", a resistance organization led by Gai Tsutsugami, which aims to liberate Japan from the GHQ, when he meets Inori Yuzuriha, the famous Internet Singer of the band Egoist and a member of the Undertakers. Due to various circumstances, Shu acquires a genetic weapon called the Void Genome, also known as "power of kings", which allows him to extract "Voids", objects with special properties that reflect the personality of their owners from underage individuals. With his new powers, Shu joins the Undertakers to protect Inori and learns secrets and mysteries he never knew.
Yukiteru (Yuki) Amano is a loner who never really interacts with people and prefers writing a diary on his cell phone, with his only companion being an imaginary friend named Deus Ex Machina, the God of Time and Space. However, Yuki soon learns that Deus is not a figment of his imagination but real when Deus makes him a participant in a battle royale with eleven others. Within this "Diary Game", the contestants are given special diaries that can predict the future, with each diary having unique features that gives it both advantages and disadvantages.