His birth year is unknown. Born into the Yomitanzan aji lineage, he is said to have been born and raised at Yamada Gusuku (in present-day Onna Village). In 1416, he distinguished himself in Chuzan king Sho Hashi's campaign against Hokuzan and, after its fall, served as guardian of the pacified north from Nakijin Gusuku. He then built Zakimi Castle on a commanding height in Yomitanzan, creating a fortress renowned for one of Ryukyu's finest arched gateways. Around 1440, by royal order he relocated to Nakagusuku, where he massively expanded the First, Second, Third, and North wards, completing what was regarded as the mightiest fortress in Ryukyu. In 1458, however, he was falsely accused of treason by Amawari, lord of Katsuren; when the royal army approached Nakagusuku Castle, Gosamaru refused to resist the king's forces and took his own life along with his wife and children (the Gosamaru-Amawari Conflict).