Einar af Wirsén was born in Uppsala, Sweden, the son of poet and literary critic Carl David af Wirsén and Cecilia Emerentia Leontina. He became a volunteer in the Svea Life Guards in 1891, passed mogenhetsexamen in 1893 and was promoted to sergeant in 1894. af Wirsén enrolled at the Royal Military Academy on 16 August 1894, was promoted to fanjunkare in 1895 and graduated from the Royal Military Academy on 20 November the same year. af Wirsén became a second lieutenant in the Svea Life Guards in 1895, was promoted to lieutenant in 1897 and attended the Royal Swedish Army Staff College from 1900 to 1902. He was appointed attaché in 1903 and was an aspirant at the General Staff from 1904 to 1906. He was promoted to captain in the Svea Life Guards in 1909. af Wirsén served on the General Staff from 1910 to 1914. He became a teacher at the Royal Swedish Army Staff College in 1911 and was then military attaché in Constantinople and Sofia from 1915 to 1920. Whilst in Constantinople and Sofia, he witnessed the Armenian Genocide along with the military operations in the Dardanelles in 1915–16 and the military operations in Macedonia in 1918. af Wirsén was promoted to major in the Swedish Army in 1917 and major in the Göta Life Guards in 1920. He was acting extra second legation secretary in Warsaw from 15 January to 31 March 1921 and was appointed acting extra first legation secretary at the Ministry for Foreign Affairs on 8 April the same year. af Wirsén was acting first legation secretary in London from 28 April to 2 July 1921 and was appointed acting chargé d'affaires in Reval and Riga on 24 June 1921. He was appointed envoy in Bucharest, Athens and Belgrade on 26 September 1921, staying in this position until the 5 November 1924 when he took a leave of absence. af Wirsén was, from 1924 to 1925, the president of the League of Nations Council-appointed investigation commission for the submission of proposals for the border between Turkey and Iraq and had a significant share in its thorough report, which formed the basis for the Council decision. af Wirsén served his mission in a very satisfactory manner, and skilfully preserved the integrity of the commission, including in relation to quite tangible British pressure. He was then appointed an envoy in Berlin on 26 September 1925 and became major in the Svea Life Guards reserve on 8 January 1926. He stayed at his post in Berlin until 1937 and then became an envoy in Rome from 1937 to 1940.