After returning to India, Mahmood enrolled as a barrister in the High Court in Allahabad in 1872, the first Indian to achieve that distinction in that court.
After his retirement from the judiciary, he returned to his legal practice as a barrister, working in Lucknow as well as serving on the North-Western Provinces and Oudh Legislative Council from 1896 to 1898.