“The idea that someone could stand in the middle of that club full of joy and fun and be drowning in madness was something we couldn’t get past,” Mr. Bendis said. Michael Avon Oeming drew the artwork, and Taki Soma colored it.

Mr. Spurlock, who is working on a documentary about superheroes for the History Channel, wrote a one-page story, with art by Kieron Dwyer, in support of the nation’s dedicated police officers. Mr. Spurlock said officers were sometimes tarnished as a group because of the actions of a few. “These guys still have to show up and do their jobs,” he said.

One of the most unusual contributions comes by way of J. K. Rowling, who allowed the use of a quote from “Harry Potter and the Goblet of Fire.” It serves as a caption to an image of Harry and his friends drawn by Jim Lee, a co-publisher of DC Comics. The pairing seemed only natural, Mr. Andreyko said.

“If we get the biggest-selling author on the planet, we need the biggest artist,” Mr. Andreyko said. Mark Chiarello, a senior vice president of art and design at DC, added a watercolor rainbow flag to the drawing.

The quote is by Albus Dumbledore, the headmaster of Harry’s school, who Ms. Rowling has said is gay, and drives home the point of the anthology: “Differences of habit and language are nothing at all if our aims are identical and our hearts are open.”