After the German surrender, YMS-400 with other YMS ships stationed at Section Base, Trinidad, BWI spent the spring and early summer of 1945 sweeping both ends of The Gulf of Paria (Venezuela/Trinidad) to recover and destroy moored mines which the United States had positioned to protect the Bay so that large naval vessels could exercise during shakedown cruises. After dry docking the ship left Trinidad in September 1945. passing through but not sweeping at the Panama Canal. Instead, heading a small convoy, YMS-400 sailed along the west coast of Central America to Newport Beach, California where it was refurbished at a private ship yard catering to wooden bottom boats.
The next trip started in late fall. This voyage via convoy took the ship to Hawaii where the minesweeper was again inspected and tuned before leaving via the Marshall atolls for Guam and subsequently, Leyte Gulf in the Philippines. While in the Philippines, YMS-400 swept several shallow bays in Ragay Gulf on Luzon and near Dipolog on Mindanao.
Following the Japanese surrender, the auxiliary motor minesweeper arrived at the Panama Canal Zone 10 September 1945 for 6 months of minesweeping. In early April 1946, YMS-400 joined all the ships in Leyte Gulf in leaving harbor for open seas in order to ride out a tsunami caused by the 1946 Aleutian Islands earthquake.
YMS-400 was named USS Magpie and reclassified AMS-25 on 17 February 1947. For the next 3 years, based at Guam, she continued sweeping duties interspersed with practice exercises in the Marshall, Caroline, and Palau Islands.
Magpie was operating out of Apra Harbor, Guam, at the outset of the Korean War. With hostilities in full fire, Magpie began minesweeping duty off Korea in September. On 1 October, while operating off the east coast of Korea with sister ship Merganser, Magpie struck a floating mine 2 miles (3.2 km) off Chusan Po, and sank. Twenty-one of her crew, including the commanding officer, Lt. (jg.) Warren R. Person, were never found. Merganser picked up the 12 survivors and transported them to Pusan.
Ensign Robert W. Langwell was one of the 20 crew members missing from Magpie. His remains were discovered in 2008 by South Korean military personnel and returned to the United States. Langwell's remains were interred at Arlington National Cemetery on 12 July 2010.