The complex of 83 buildings dates largely from 1601 to 1609, when Ikeda Terumasa, given the castle by Tokugawa Ieyasu after the Battle of Sekigahara, rebuilt and enlarged it with three moats. It came through the Meiji-era demolitions, the bombing of Himeji in 1945 and the Great Hanshin earthquake of 1995 without serious harm, and in December 1993 it became one of Japan's first UNESCO World Heritage Sites.

A fort first stood here in 1333, built by Akamatsu Norimura; it was replaced by Himeyama Castle in 1346, turned into Himeji Castle by the Kuroda clan by 1561, and expanded by Toyotomi Hideyoshi, who added a three-storey keep in 1581. Ikeda pulled that keep down and built the present one. In 1617 Honda Tadamasa took over and added buildings including the Dressing Tower for Princess Sen. After the castle was abandoned in 1871, an army colonel, Nakamura Shigeto, saved it from planned demolition; a stone monument to him stands inside the first gate, the Hishi Gate.

The main keep rises 46.4 metres at the heart of the complex, joined by three smaller keeps into a single cluster. From outside it seems to have five floors, but inside there are six and a basement. The first floor is known as the "thousand-mat room" for its more than 330 tatami mats, and its walls carry racks once used for matchlocks and spears. The third and fourth floors have stone-throwing platforms by the windows and small hidden rooms where defenders could wait for attackers. Two great pillars run up through the keep; the western one, of Japanese cypress, was replaced during the Shōwa restoration of 1956 to 1964 with two trunks joined on the third floor. The sixth floor's windows look out over the city.

The approach to the keep is a defence in itself. Gates, baileys and walls are arranged so that anyone climbing to the keep has to wind around the complex in a spiral; from the Hishi Gate the keep is only 130 metres away in a straight line, but the path is 325 metres long, steep and narrow, and it sometimes doubles back. Roughly 1,000 loopholes in round, triangular and square shapes, chutes for dropping stones, and storehouses for rice, salt and water show how the castle was prepared for a siege that never came. Of its original 84 gates, 21 survive, many named after letters of the iroha syllabary.

Several legends are attached to the castle. Okiku's Well, linked to the ghost story Banshū Sarayashiki in which Okiku, wrongly blamed for losing precious dishes, is killed and thrown into a well, is still pointed out in the grounds. The "Old Widow's Stone", a millstone said to have been given to Hideyoshi by a poor old woman when he ran short of stone, can be seen under a wire net in one of the walls. Beside the castle lies Kōko-en, a Japanese garden created in 1992 for the city's 100th anniversary.