Latif joined government service in 1849 as a deputy magistrate and was promoted to the post of presidency magistrate in 1877. While serving as the deputy magistrate of Satkhira, he witnessed the repression and exploitation of the peasants by the English indigo planters. He encouraged the farmers there to become united and tell the government about their grievances. He himself took some initiative in this Indigo revolt. Finally, the British government formed the Indigo Commission in 1860 due to his initiative with the goal of putting an end to the repressions of indigo planters.