This movie is actually inspired by the infamous psycho killer Raman Raghav who operated in Mumbai during 1960's, which is played by Nawazuddin Siddiqui.
In an interview Nawazuddin Siddiqui said that he ran away from home for two days without informing anyone after which he started fearing himself. This is how he got into this role.