HASNABAD, India—Decades ago, Siraj Gazi's grandfather changed his last name of Chowduli to the higher-caste Gazi. He hoped it would erase the social stigma of his low-caste roots.

Today, 23-year-old Mr. Gazi, a college graduate, is trying to prove that he is, in fact, a Chowduli—a surname so low, it is akin to a racial epithet here.

"My grandfather...