In the Enbun era (1356 to 1360) of the period of the Northern and Southern Courts (Japan), Kaneyori SHIBA, a son of Iekane SHIBA, Oshu Kanrei (governor of Oshu), which was a branch of the Shiba clan, moved to Yamagata as Dewa no kuni Azechi and built Yamagata-jo Castle as his headquarters.
南北朝時代(日本)の延文期(1356～60)に斯波氏傍流の奥州管領斯波家兼の子、斯波兼頼が出羽国按察使として山形に入部し、山形城を築城し本拠とする。