Due to Aziz Khan's ability to read and write, as well having a good handwriting, he joined the sixth regiment (
fawj-e sheshom) of
Azerbaijan at
Tabriz. He later led this regiment as its
sarhang during the Iranian
siege of Herat in 1837–1839. Acting as the representant of the
Qajar shah Mohammad Shah (), Aziz Khan spent two days in fruitless negotiations with the Afghan ruler of Herat,
Kamran Mirza Durrani, and his vizier
Yar Muhammad Khan Alakozai. Following his Herat operation, Aziz Khan was deprived of any important political duty. discussing with Aziz Khan. Painted by
Abu'l-Hasan Sani al-Mulk in In 1840/1, Mohammad Shah sent Mirza Nabi Khan Qazvini to
Fars to take charge of its affairs, since its inhabitants had rebelled against Fereydun Mirza Farmanfarma. At the suggestion of Mirza Nazar-Ali Hakim-bashi, Nabi Khan had taken Aziz Khan with him as a consultant (
rish-safid). They both returned to Fars later in 1843. Although Nabi Khan was succeeded by
Hossein Khan Ajudanbashi as the governor of Fars the following year, Aziz Khan remained consultant through the support of Hakim-bashi. Ajudanbashi, who knew Aziz Khan from Tabriz, appointed him as his consultant, then
tahwildar and later
sarhang of the fourth regiment of Tabriz, which was stationed in Fars. Aziz Khan continued to serve under Ajudanbashi until Mohammad Shah's death in September 1848. Following the succession of Mohammad Shah's son
Naser al-Din Shah and his appointment of Mirza Taqi Khan Amir Nezam (later known as
Amir Kabir) as
grand vizier in October 1848, the inhabitants of the city of
Shiraz in Fars rebelled against Ajudanbashi. Aziz Khan played a vital role as the mediator between the conflicting sides. This prompted Amir Kabir to acknowledge Aziz Khan's importance and appoint him as the
ajudan-bashi (
adjutant) despite his unfriendly relations with Aziz Khan's patrons, Ajudanbashi and Hakim-bashi. According to the modern historian J. Calmard, Amir Kabir's support was crucial for Aziz Khan's future rise to power due to the latter's
Sunni and modest background. During the
Babi revolt of 1850–1851 in
Zanjan led by
Hujjat, Amir Kabir sent Aziz Khan to suppress the revolt, as well as an envoy to the
Russian-controlled city of
Yerevan, where Prince Alexander Pavlovitch was quelling a local revolt. After having his attempt to both negotiate and then attack the Babis thwarted, Aziz Khan left the commander of the Zanjan forces, Mohammad Khan Amir Tuman, to deal with them, and instead went to Yerevan, where he was well received. When Aziz Khan returned to the capital of
Tehran on 12 March 1851, he was given a friendly reception with Naser al-Din Shah. While Naser al-Din Shah was travelling to
Persian Iraq along with Amir Kabir (from May to October 1851), Aziz Khan served as the commander of the army and the fortress at Tehran. Aziz Khan's son Ali Khan was soon appointed the new chief of the newly established police force in Tehran. After the death of the director of the
Dar ul-Funun college,
Mirza Mohammad-Ali Khan Shirazi on 10 February 1852, Aziz Khan succeeded him. Occupying the office for only a few months, Aziz Khan seemingly did not make much of an impact on the administration of the college or its well-being. Later in the same year, Aziz Khan personally arranged the execution of
Táhirih, an influential figure in the newly established
Bábi Faith. Although Aziz Khan had hostile relations with the new grand vizier
Mirza Aqa Khan Nuri (appointed in 1851), he had become well-versed in political survival, and as a result succeeded getting promoted to
sardar-e koll-e asaker (commander-in-chief of the army) on 8 August 1853. During the same month, Aziz Khan had an "impressive military parade" arranged for Naser al-Din Shah at
Soltaniyeh. == First term as commander-in-chief==