Before Heath Ledger was cast in July 2006, Paul Bettany, Lachy Hulme, Adrien Brody, Steve Carell, and Robin Williams publicly expressed interest in it. However, Nolan had wanted to work with Ledger on a number of projects in the past (including unsuccessfully approaching Ledger for the role of Batman in "Batman Begins") and was agreeable to Ledger's chaotic interpretation of the character.

When Ledger saw "Batman Begins", he had realized a way to make the character work that was consistent with the film's tone: he described his Joker as a "psychopathic, mass murdering, schizophrenic clown with zero empathy".

In 2008, after filming had finished on the "The Dark Knight", Ledger died of an accidental prescription drug overdose. This lead to intense press attention and memorial tributes. "It was tremendously emotional, right when he passed, having to go back in and look at him every day (during editing)", Nolan recalled. "But the truth is, I feel very lucky to have something productive to do, to have a performance that he was very, very proud of, and that he had entrusted to me to finish". All of Ledger's scenes appear as he completed them in the filming; in editing the film, Nolan added no "digital effects" to alter Ledger's actual performance posthumously. Nolan dedicated the film in part to Ledger's memory.

More Info: en.wikipedia.org