After Houston received word that Santa Anna was leading a large force to San Antonio, Bowie offered to lead volunteers to defend the Alamo from the expected attack. He arrived with 30 men on January 19, where they found a force of 104 men with a few weapons and a few cannons but little supplies and gunpowder. Houston knew that there were not enough men to hold the fort in an attack and had given Bowie orders to remove the artillery and blow up the fortification. Bowie and the Alamo captain, James C. Neill, decided they did not have enough oxen to move the artillery someplace safer, and they did not want to destroy the fortress. On January 26, one of Bowie's men, James Bonham, organized a rally which passed a resolution in favor of holding the Alamo. Bonham signed the resolution first, with Bowie's signature second.
Through Bowie's connections due to his marriage and his fluency in Spanish, the predominantly Mexican population of San Antonio often furnished him with information about the movements of the Mexican army. After learning that Santa Anna had 4,500 troops and was heading for the city. Bowie wrote several letters to the provisional government asking for help in defending the Alamo, especially "men, money, rifles, and cannon powder". In another letter, to Governor Smith, he reiterated his view that "the salvation of Texas depends in great measure on keeping Bexar out of the hands of the enemy. It serves as the frontier picquet guard, and if it were in the possession of Santa Anna, there is no stronghold from which to repel him in his march toward the Sabine." The letter to Smith ended, "Colonel Neill and myself have come to the solemn resolution that we will rather die in these ditches than give it up to the enemy."
On February 3, William Travis arrived with an additional 30 troops, and several days later Davy Crockett appeared with twelve Tennesseans. Neill went on furlough on February 17 to visit his sick family, leaving Travis, a member of the regular army, in command. Bowie was older than Travis with a better reputation and considered himself a colonel, thus outranking Travis, a major. He refused to answer to Travis, who called an election for the men to choose their own commander. They chose Bowie, infuriating Travis. Bowie celebrated his appointment by getting very drunk and causing havoc in San Antonio, releasing all prisoners in the local jails and harassing citizens. Travis was disgusted, but two days later the men agreed to a joint command; Bowie would command the volunteers, and Travis would command the regular army and the volunteer cavalry.
Fearing for the safety of his wife's relatives in San Antonio, Bowie asked her cousins Getrudis Navarro and Juana Navarro Alsbury, as well as Alsbury's 18-month-old son, Alijo, to stay inside the walls of the Alamo. Bowie had been ill, and two doctors, including the fort surgeon, were unable to diagnose his illness. Travis became the sole commander of the forces when Bowie was confined to bed. Santa Anna and his army reached the outskirts of San Antonio de Bexar several days later and began a siege of the Alamo on February 24. The Mexican army raised a red flag to warn the defenders that no quarter would be given.
Travis sent Juan Seguin to recruit reinforcements on February 25, and 32 additional men arrived. Thirty-five years after the Alamo fell, a reporter identified Louis "Moses" Rose as the only man to have deserted the Texan forces at the Alamo. According to the reporter's version of Rose's account, when Travis realized that the Mexican army would likely prevail, he drew a line in the sand and asked those willing to die for the cause to cross the line. At Bowie's request Crockett and several others carried the cot over the line, leaving Rose alone on the other side. After its publication, several other eyewitnesses confirmed the account, but as Rose was deceased the story can only be authenticated by the word of the reporter, who admitted to embellishing other articles, "and thus many historians refuse to believe it."
Bowie perished with the rest of the Alamo defenders on March 6, when the Mexicans attacked. Most of the noncombatants in the fort, including Bowie's relatives, survived. Santa Anna ordered the alcade of San Antonio, Francisco Antonio Ruiz, to confirm the identities of Bowie, Travis, and Crockett. After first ordering that Bowie be buried, as he was too brave a man to be burned like a dog, Santa Anna later had Bowie's body placed with those of the other Texans on the funeral pyre.
When Bowie's mother was informed of his death she calmly stated "I'll wager no wounds were found in his back." Various eyewitnesses to the battle gave conflicting accounts of Bowie's death. A newspaper article claimed that a Mexican soldier saw Bowie carried from his room on his cot, alive, after the conclusion of the battle. The soldier maintained that Bowie verbally castigated a Mexican officer in fluent Spanish, and the officer ordered Bowie's tongue cut out and his still-breathing body thrown onto the funeral pyre. This account has been disputed by numerous other witnesses, and it is thought to have been invented by the reporter. Other witnesses maintained that they saw several Mexican soldiers enter Bowie's room, bayonet him, and carry him, alive, from the room. Various other stories circulated, with some witnesses claiming that Bowie shot himself and others saying he was killed by soldiers while too weak to lift his head. Alcade Ruiz said that Bowie was found "dead in his bed." The "most popular, and probably the most accurate" version is that Bowie died on his cot, "back braced against the wall, and using his pistols and his famous knife." One year after the battle, Juan Seguin returned to the Alamo and gathered the remaining ashes from the funeral pyre. He placed these in a coffin inscribed with the names of Bowie, Travis, and Crockett. The ashes were interred at the Cathedral of San Fernando.