According to "Divine Wind and Ancient Heroes: Reconstructing the Kamikaze Ideology"
In 1281, Japan was invaded by Mongols, and the Emperor prayed for divine help in defeating them. As if in answer to his prayers, a great typhoon sprang up, and caused the enemy to drown by sinking their ships. This typhoon was referred to as as 'Kamikaze' or 'Divine Wind'. Later, in World War II, the young Japanese suicide pilots were called Kamikaze, as they 'flew' on the wind on the devine mission of destroying their enemy with the sacrifice of their lives.
The Devine Wind
The monstrous waves and winds, whipped up by a typhoon also helped to smash the invaders' line of ships, reducing most of their junks to junk. The wreckage and loss of enemies life was staggering. Once again, Kublai Khan's designs on Japan were defeated by a typhoon and tsunami. And never again did he attempt such an invasion. If it were not for those two typhoons and tsunami - Kamikazes or "Divine Winds," as the Japanese called them afterwards - that destroyed the Mongol invading fleets of 1274 and 1281, Japan today might still be part of China!
Original Yoshitora (1840 - 1880)
Japanese Woodblock Print
Beautiful illustration of the defeat of the Mongol attempt to invade Japan. In this image, the Samurai are assisted through divine intervention, a kamikaze or "divine wind" with deities appearing in the stormy sky, charging the enemy's ships with swords and spears. Two Mongol ships capsize at left, gigantic white-capped waves engulfing the sinking boats. On the shore at lower right, Samurai attack the few enemies that have made it to land, felling them with swords, the bodies tumbling to the ground atop their guns.
Kikuchi Yosai Illustration About Kamikaze - 1847
The name given to the storm, kamikaze, was later used during World II as nationalist propaganda for suicide attacks by Japanese pilots.