In 1896, Khanbahadur Ahsanullah joined the government service. At the beginning of his career, he was appointed the Supernumerary Teacher at the Rajshahi Collegiate School for a brief period of time. During this time, A.W Croft was the Director of the Department of Education. After a few months, with a raise in salary, Khanbahadur Ahsanullah was appointed Additional Deputy Inspector of Faridpur.
After having had some experiences in working as the Additional Deputy Inspector, he served as the Sub-inspector of Schools for six months. During this period, he had to inspect many schools.
On April 1, 1898, he gave up the job of the temporary Sub-inspector and joined the service permanently as Deputy Inspector. After that, he was posted as the Deputy Inspector in the relatively larger district of Bakherganj. He was appointed to the post by Director Martin. His office was in Barisal.
Khanbahadur Ahsanullah spent the next seven years of his service life working in the post of Deputy Inspector. At this time, Director Martin recommended the names of 12 officials to the Government of Bengal for being absorbed from the Subordinate Education Service into the Provincial Education Service. The name of Khanbahadur Ahsanullah was also among them and he was considered eligible by the Director. As a result, he became the first person to be absorbed from the inspecting line to the teaching line in the Provincial Service and was, consequently, appointed the Head Master of Rajshahi Collegiate School in 1904. During his working tenure there, he created a congenial atmosphere for the education of Muslim students and removed the age-old hurdles that impaired their growth.
During one of his inspections to the Rajshahi Collegiate School, the then Director of the Department of Education for East Bengal and Assam, H Sharp expressed his total satisfaction at the work carried out by Khanbahadur Ahsanullah. As a recognition of his accomplishment, in 1907, he was appointed the Divisional Inspector for the Chittagong region. For long 17 years, he stayed in Chittagong and made considerable improvements in the field of education in this division.
Following some recommendations from H Sharp, huge financial allocations were made by the government for the advancement of education in East Bengal and Assam during this time. H Sharp was always confident about the competence, honesty and professional integrity of Khanbahadur Ahsanullah. So, he was never miserly in sanctioning the financial budgets proposed by Khanbahadur Ahsanullah for the development of education in the Chittagong division. Being sanctioned enough money, he could take many positive steps for the qualitative and quantitative improvements of many impoverished sub-divisional schools in the region. His persoal contribution in establishing and running the high-schools in Feni, Chandpur, Brahmanbaria, Chittagong and Noakhali was enormous. The huge school in Sheoratoli near Chittagong city was built at his initiative. Besides, in many areas of the Chittagong division, he built a number of hostels both for the Hindu and the Muslim students. He also built many schools in the abandoned houses of the Hindu zamindars or landlords. In the month of June, 1911, he was elected a Member of the Royal Society (MRSA) of London.
In 1912, the Delhi darbar or conference was held. In this conference, the King annulled the partition of East and West Bengal. As a result, for the next few years, he was appointed the Additional Inspector of Presidency. So, he left Chittagong for Calcutta. Dr Donne who became the Director Later, was the Inspector during this period.
When Khabahadur Ahsanullah was serving in the Chittagong division, he was absorbed into the Indian Education Service (IES). After that, he was appointed the "Assistant Director of Muslim Education in Bengal". He continued his service as Assistant Director for the next five years.
In the undivided Bengal, no Indian had hitherto been appointed Assistant Director. And after his retirement, the post was filled by an Englishman by the name of Botmali as no Indian after him was considered eligible for the post. In those days, two Assistant Directors were appointed to help the Director. But both had the same official status and remuneration ceilings. When the Division of Bengal was called off, the post of the Assistant Director was transferred to Calcutta. So, Khanbahadur Ahsanullah also moved to Calcutta. For some time, he even held the current charge of Director of the Department of Education in undivided Bengal. In 1929, at the age of 55, he retired from the government service.