He was educated in France and Germany, including the University of Giessen and the University of Marburg. He passed an examination for the Diplomatic Service in September 1903.
Sansom first arrived in Japan in 1904 and was attached to the British legation in Tokyo to learn the Japanese language. While he was working as private secretary to Sir Claude Maxwell MacDonald the legation gained higher status by becoming an embassy, and Sansom was present during the negotiations for the renewal of the Anglo-Japanese Alliance in 1905. He remained in Japan for most of his diplomatic career, serving in consulates around Japan, where he also acquired proficiency in Japanese dialects.
Sansom began his literary career in 1911 with a translation of the Tsurezuregusa by Yoshida Kenkō, a major text of the Kamakura period.
Sansom was on leave in London in 1915, but was declared unfit for military service in the First World War. He was assigned by the Foreign Office to the War Office to undertake political espionage, and was sent to Archangel in Russia.
Sansom returned to Japan in January 1920 as Secretary to Sir Charles Eliot, whose interest in Japanese Buddhism spurred Sansom's own interest in Japanese history and culture. He was thus encouraged to follow in the footsteps of his scholarly predecessors among British diplomats in Japan, such as Ernest Mason Satow, William George Aston and John Harington Gubbins. The position also gave Sansom access to many Japanese scholars as well as political leaders.
Sansom was promoted to Commercial Secretary from 1923.
Also in 1928, Sansom published An Historical Grammar of Japanese. He followed this in 1931 with Japan: A Short Cultural History and in 1935 with a new edition of Sir Charles Eliot’s Japanese Buddhism, which had been left incomplete at the time of Eliot’s death.
In January 1930 Sansom was promoted to Commercial Counsellor, in charge of improving trade relations. He visited the Philippines in 1932. In 1933 Sir Francis Oswald Lindley assigned him the task of negotiating a commercial treaty between British India and Japan. Sansom was made a member of the Japan Academy in 1934. In 1935 Sansom took a leave of absence of six months, which he spent at Columbia University in New York as a lecturer. While he was on leave in London he announced his retirement from the Diplomatic Service with effect from September 1940. He agreed to return to Japan for one more mission before taking up a position waiting for him at Columbia University.