Anderson was born on 11 April 1874, the second son of General David Anderson, Colonel of the Cheshire Regiment, and his wife Charlotte Christina, née Anderson in Newton-by-Chester in Cheshire, England. His elder brother was Lieutenant General Sir Warren Hastings Anderson. In 1887, as a 13-year-old, he became a cadet at the Royal Naval College, Dartmouth. Seeing action against King Koko slave traders on the Niger River, he became a lieutenant on 23 February 1895 at age 20. Anderson saw further action against West-African rebels and in the Ashanti Campaign. In May 1902, he was posted as First and gunnery lieutenant to the cruiser on the Channel Squadron.