Cody's father believed that Kansas should be a free state, but many of the other settlers in the area were pro-slavery. While giving an anti-slavery speech at the local trading post, he so inflamed the supporters of slavery in the audience that they formed a mob and one of them stabbed him. Cody helped to drag his father to safety, although he never fully recovered from his injuries. The family was constantly persecuted by the supporters of slavery, forcing Isaac Cody to spend much of his time away from home. His enemies learned of a planned visit to his family and plotted to kill him on the way. Cody, despite his youth and the fact that he was ill, rode 30 miles to warn his father. Cody's father died in 1857 from complications from his stabbing.
After his father's death, the Cody family suffered financial difficulties, and Cody, aged only 11, took a job with freight carrier as a "boy extra," riding up and down the length of a wagon train, delivering messages. From here, he joined Johnston's Army as an unofficial member of the scouts assigned to guide the Army to Utah to put down a falsely-reported rebellion by the Mormon population of Salt Lake City.