In 27 September 1911, he was assigned to a post in General Staff in Istanbul. Mustafa Kemal went to Istanbul and worked in the General Staff for some period. On 5 October 1911, Italians attacked on Trablusgarp and started invasion movements. Mustafa Kemal left Istanbul on 15 October 1911 to be charged in this region. He led voluntary local forces in Tobruk and Derne Regions pursuant to his arrival in Trablusgarp for a period. He was made Derne Commander on 12 March 1912. On 27 November 1911, he was promoted as a Major.

In October 1912, Balkan War had begun. Mustafa Kemal moved from Trablusgarp to Istanbul on 24 October 1912. He was appointed as the director of Operations Branch of Command of Planned Forces of Mediterranean Strait on 21 November 1912. After Balkan War, he was assigned as Military Attaché of Sofia on 27 October 1913. As from 11 January 1914, the duty of carrying out Belgrade and Çetine Military attachés was given to him. His close friend Ali Fethi (Okyar) was appointed as the Sofia Ambassador when he was appointed as Sofia Military Attaché. Mustafa Kemal was promoted to lieutenant colonelcy during his days as Sofia Military Attaché, on 1 March 1914. He stayed in Sofia until the end of January 1915.

On 18 March 1915, British Navy attempted to pass Dardanelles, but could not succeed due to the successful defense of shore artillerymen and suffered great casualties. The enemy, not being able to pass the strait with its navy, decided to land in Gelibolu Peninsula. General Staff had decided to establish a 5th Army in Gelibolu on 23 March 1915, and German General Liman von Sanders was appointed as its commander.

Liman von Sanders grouped his forces into three against a possible enemy attack and made the forces led by Mustafa Kemal reserve. Mustafa Kemal, in accordance with this plan, passed to Bigalı with his division on 18 April 1915. The first landing operation started on 25 April 1915 from Seddulbahir and Arıburnu region. However, landing operation encountered Mustafa Kemal the first day. Mustafa Kemal, seeing that landing started, took his forces from Bigalı to Conkbayırı rapidly. British forces were forced to withdraw upon attacks of 19th Division commanded by Mustafa Kemal that day. Mustafa Kemal was promoted to Colonelcy on 1 June 1915 upon his success in Çanakkale front.

Mustafa Kemal was appointed to 16th Army Corps Command headquartered in Edirne on 27 January 1916. Upon the decision that the same Army Corps be established in Diyarbakır withthe same name, he was transferred as the Army Corps commander to Diyarbakır-Bitlis-Muş Front on 11 March 1916. He was promoted as a General on 1 April 1916.

On 30 October 1918, Ottoman State withdrew from 1st World War by signing Mondros Armistice with states of entente. Despite Mustafa Kemal Pasha was appointed as the Commander of Yıldırım Armies Group on 31 October 1918, in the following day after Mondros Armistice, there was nothing left to do. Upon sultan decree lifting this Group Command on 7 November 1918, he departed from Adana to Istanbul on 13 November 1918.