The Korean War started in 1950 when tank-led North Korean troops invaded South Korea. The U.S. and 20 other allied countries fought on the side of South Korea under the U.N. flag.
Ban, who was attending a global forum on aid effectiveness in Busan, visited the U.N. Memorial Cemetery, which contains the remains of 2,300 foreign soldiers killed in the three-year war.
It marked the first visit to the cemetery by a U.N. chief, officials said.
Ban, a former South Korean foreign minister, paid his respects to the war dead by laying a white flower at a representative grave.