During World War I, Stanley Cocking served with the 6th Infantry Batallion AIF, initially at Gallipoli and later in France, where he was wounded on several occasions. During the war a number of his letters to family were published in the Australian newspapers. By war's end he had attained the rank of captain.