Matsuoka returned to Japan and joined the foreign service. After 18 successful years as a diplomat he became director of the South Manchurian Railroad.
Fumimaro Kondoye appointed Matsuoka as his foreign minister in July 1940 and successfully negotiated the Tripartite Pact with Nazi Germany in September 1940. The following year he visited the Soviet Union and signed a non-aggression treaty with Joseph Stalin on 14th April 1941. Matsuoka was replaced by Soemu Toyoda as foreign minister in July 1941.
After the Second World War Matsuoka was arrested and charged with war crimes. However, he died on 26th June 1946, before the trial could take place.