A native of Kobe in Hyogo Prefecture, Miyazaki graduated from the 48th class of the Imperial Japanese Naval Academy, rated 5th of his class of 171 cadets. His classmates included Tamotsu Oishi. He was commissioned as an ensign in 1921. After graduating from torpedo warfare school, he served as Torpedo Officer on the light cruiser and the heavy cruiser. During his term at the 30th class of Navy Staff College, Miyazaki came under criticism for sabotaging a war game exercise which was unfairly weighed so that the team playing the Japanese side would always defeat the team playing the American side. His actions were supported by Admiral Jisaburō Ozawa and he was allowed to graduate. Afterwards, as a lieutenant commander, he was sent to Stanford University in California from 1933 for further studies, but his real role was to work in naval intelligence to build a spy ring and gather information on American military activities on the west coast of the United States. Operating under the name of “Mr. Tanni”, he recruited former Navy yeoman Harry Thomas Thompson, in San Pedro, California in the run-up to World War II. Thompson agreed to board U.S. Navy ships dressed in a yeoman's uniform, for the purpose of gathering information from the crews. Through this and other methods, he was able to sell engineering, gunnery, and tactical information about the Pacific Fleet that was mainly based in nearby San Diego at that time. Unfortunately for Thompson, the Director of the Office of Naval Intelligence, Capt. William D. Puleston, took a personal interest in so-called language students like Miyazaki. His suspicions were borne out when Japanese coded radio messages were intercepted and deciphered. On Thompson’s arrest in 1936, Miyazaki fled back to Japan. The incident was highly publicized, including in a 1943 novel by Alan Hynd, Betrayal from the East: The Inside Story of Japanese Spies in America which was subsequently made into a movie. After returning to Japan, Miyazaki was promoted to Commander on 1 December 1936. He was given command of the destroyer from 15 December 1938 until 20 October 1939. At the start of the Pacific War, on 15 October 1941, Miyazaki was promoted to Captain and served on the staff of the IJN 5th Fleet. He subsequently was promoted to captain and served as commander of Destroyer Division 17 in the Southwest Pacific from 17 June - 18 December 1943, followed by a posting as Senior Instructor at the Torpedo School in Oppama. He was then made captain of the aircraft carrier followed by. He was still captain of the Katsuragi when the war ended, and was retained until the end of 1946 to command the vessel as a repatriation ship, bringing back former Japanese soldiers, POWs, and civilians from southeast Asia and Australia.