The game takes place in the aftermath of the Calamity, a catastrophic event that suddenly fractured the city of Caelondia as well as the surrounding areas of the game's world into many floating pieces, disrupting its ecology and reducing most of its people to ash. Players take control of the Kid, a silent protagonist who awakens on one of the few remaining pieces of the old world and sets off for the eponymous Bastion, where everyone was supposed to go in troubled times. The only survivor he meets there is an elderly man named Rucks, the game's narrator, who instructs him to collect the Cores that once powered Caelondia. A device in the Bastion can use the power of the crystalline Cores to create landmasses and structures, as well as enable the Kid to travel farther afield via "skyways" that propel him through the air.
During his quest, the Kid meets two more survivors: Zulf, an ambassador from the Ura, underground-dwelling people with whom Caelondia was once at war; and Zia, an Ura girl who was raised in Caelondia. Both of them return to the Bastion, but upon reading a journal that the Kid discovers, Zulf intentionally damages parts of the Bastion's central device (the monument) and returns to Ura territory. The Kid learns that the journal belonged to Zia's father, Venn, who had worked for the Caelondians. He had helped Caelondian scientists ("Mancers") build a weapon intended to destroy the Ura completely to prevent another war. Venn rigged the weapon to backfire, so that when he was finally forced to trigger it, the resulting Calamity destroyed most of Caelondia as well.
To repair Zulf's damage to the Bastion, the Kid starts collecting Shards, a lesser form of Cores. As he obtains the penultimate shard needed, the Ura attack the Bastion, damaging it and abducting Zia. In the next seven days, The Kid engages in sporadic skirmishes in Ura territory. When he finally blasts through an Ura outpost and meets Zia, she tells him that she had left with the Ura voluntarily to find out their intentions; Rucks had previously told Zia that the Bastion had the ability to somehow fix the Calamity. The Kid travels to the once-underground Ura homeland to retrieve the last shard. There, he discovers Zulf being attacked by his own people: the battle with Kid has devastated the Ura forces, and they blame Zulf for bringing the Kid to their home. The Kid can choose to drop his weapon to help Zulf or leave him. If he leaves Zulf behind, the Kid destroys the remnants of the Ura and escapes through a skyway. If he chooses to carry Zulf, Ura archers initially open fire on them but ultimately cease fire and watch silently as the Kid and Zulf take the skyway back to the Bastion.
After the Kid returns and recovers, Rucks gives him another choice: He can have the Bastion rewind time to before the Calamity in the hopes of preventing it, or use it to evacuate the survivors and move on to somewhere safe. Rucks is unsure if there is any way to prevent the Calamity from reoccurring if the time is rewound, as there was no way to test the process. The game ends either way, showing images of the characters (with the inclusion of Zulf if the player chose to rescue him) flying away or of their lives before the Calamity along with the credits. In the New Game+ mode, which is unlocked after beating the game once, it is hinted that restoring the world didn't prevent the Calamity.