Cunningham was born in Rathmines in the south side of Dublin on 7 January 1883. After starting his schooling in Dublin and Edinburgh, he enrolled at Stubbington House School, at the age of ten. He entered the Royal Navy in 1897 as a naval cadet in the officers' training ship "Britannia", passing out in 1898. He commanded a destroyer during the First World War and through most of the interwar period. He was awarded the Distinguished Service Order and two Bars, for his performance during this time, specifically for his actions in the Dardanelles and in the Baltics.