The Arab Revolt of 1916-1918 came about as Arabian nationalists from various locations attempted to separate themselves from the Ottoman Empire. The timing of the revolt, during World War I, recognized that Ottoman troops were involved in fighting in support of their German allies and, therefore, would not have as many forces to devote to putting down the revolution within their own territory.
Lawrence of Arabia, by the time the Arab Revolt took shape, had spent many years working and traveling throughout the Ottoman Empire and neighboring regions. He was sent to Cairo at the beginning of World War I by the British military command to assist in providing strategic information about the geography and topography of the area for the Allied troops fighting against forces of the Ottoman-German Alliance.
Lawrence fought with the Arab guerilla forces against the Ottoman Empire. The goal of their battles was to bring about the collapse of the Ottomans, leading to the creation of a separate and independent Arab nation.