 He grew an interest in the Arabic and Persian languages, and so he studied under Abul Fazl, a detective of the Hingazia thana.In 1823, he became a local judge (Munsiff) for the Hingazia thana for 7 years.After researching about various religions, he later became a Sunni Muslim, leaving behind his Hindu traditions and his career as a judge.