In Dark Days: The Casting, when Batman finds Green Lantern and Duke inside his subcave, he states that he died in the hands of the Joker, in which issue and what storyline was he referring to?
Batman: Endgame is a four-issue miniseries which sees the final epic battle between the Clown Prince of Crime and the Dark Knight. Things get crazy in this issue after Joker cuts off Alfred's hand and tortures Jim Gordon (though not for the first time). When the two finally come to blows, it's apparent the Joker no longer wants to taunt his enemy - he's ready to kill him.
Joker takes one hell of a beating, while Batman is stabbed multiple times. Batman also gets some razor-sharp playing cards thrown into his eyes before the two finally deal one another mortal blows. As they lay dying, the roof of the cave begins to collapse, sending giant stalactites down onto them. As they are about to be buried in rubble, Batman muses, "I’m just going to rest here a little while with my friend."
And Valorum has also posted a link to the annotation to Dark Days that confirms it.
Joker says he was resurrected after he and Batman died under Gotham in "Endgame" by a liquid, green metal (sounds like Dionesium, which is an Nth metal variant that fuels the Lazarus Pits). While down there he saw an ancient cave painting of a bat ("the bat behind the bat"). Joker wanted to know what it was (and five will get you 10 it's the creature Shazam warned about).