In 1940, as a Royal Navy sub-lieutenant, he worked in the Admiralty War Room. He set up the floating map room for Winston Churchill in the battleship 'Duke of York' and subsequently accompanied the prime minister to Washington, where Roosevelt's request, he established a similar map room in the White House. In 1942, Cox was appointed Junior Staff Officer (Flag Lieutenant) to Vice Admiral Bruce Fraser, second-in-command of the Home Fleet in the battleship Anson.