His first gunfight took place in Sweetwater, Texas in 1876 when he was attacked by a man in a fight over a girl. The other man died of his wounds. Masterson was shot in the pelvis. This injury resulted in his carrying a cane for the rest of his life.
In 1877, he joined his brothers in Dodge City, Kansas. Jim was a partner in a saloon there and Ed was a deputy sheriff. Soon after his arrival, Masterson came into conflict with the local marshal over the treatment of a man being arrested. He was jailed and fined, although his fine was later returned by the City Council.  He served, alongside Wyatt Earp, as a sheriff's deputy and within a few months he was elected County Sheriff of Ford County, Kansas. He served as sheriff until 1879 when he was voted out of office. During this same period his brother Ed was Marshall of Dodge City and was killed in the line of duty.
For the next several years, he made a living as a gambler moving through several of the legendary towns of the Old West. He visited Wyatt Earp in Tombstone, Arizona, leaving shortly before the famous "Gunfight at the O.K. Corral." He spent a year as Marshall of Trinidad, Colorado.
By 1891, he was living in Denver, Colorado, where he bought the Palace Variety Theater. He married an actress, Emma Walters, on November 21, 1891. He continued to travel in the boomtowns of the West, gambling and promoting prize fights. He began writing a weekly sports column for George's Weekly, a Denver newspaper, and opened the Olympic Athletic Club to promote the sport of boxing.
Bat Masterson lived in the American West during a violent and frequently lawless period. He was well-known as a gunman. Reports on the number of people he killed range from one or two, to as many as 26.