In 1897, King Gojong, the twenty-six ruler of Korea's Joseon Dynasty, announced the creation of the Korean Empire. The empire would last for only 13 years, and would exist under the shadow of Japanese control.
Up until the late nineteenth century, Korea was an independent tributary of Qing China. In fact, this relationship reached far back into history, long before the Qing era (1644-1912). Under pressure from European and American forces during the colonial period, however, China grew weaker and weaker.
As China's strength faded, Japan's grew. This rising power to Korea's east imposed an unequal treaty upon the Joseon ruler in 1876, forcing open three port cities to Japanese traders and giving Japanese citizens extraterritorial rights within Korea. (In other words, Japanese citizens were not bound to follow Korean laws, and could not be arrested or punished by Korean authorities.) It also brought to an end Korea's tributary status under China.
Nevertheless, when a peasant uprising lead by Jeon Bong-jun in 1894 threatened the stability of the Joseon throne, King Gojong appealed to China for help rather than Japan. China sent troops to assist in quelling the rebellion; however, the presence of Qing troops on Korean soil prompted Japan to declare war. This sparked the First Sino-Japanese War of 1894-95, which ended in a crushing defeat for China, long the greatest power in Asia.