James Bennett McCreary was born in Richmond, Kentucky, on July 8, 1838. He was the son of Edmund R. and Sabrina (Bennett) McCreary. He obtained his early education in the region's common schools, then matriculated to Centre College in Danville, Kentucky, where he earned a bachelor's degree in 1857. Immediately thereafter, he enrolled at Cumberland University in Lebanon, Tennessee, to study law. In 1859, he earned a Bachelor of Laws from Cumberland and was valedictorian of his class of forty-seven students; he was admitted to the bar and commenced practice at Richmond.
Shortly after the Battle of Richmond on August 29, 1862,
David Waller Chenault, a Confederate sympathizer from Madison County, came to Richmond to raise a Confederate regiment. On September 10, 1862, Chenault was commissioned as a colonel and given command of the regiment, dubbed the
11th Kentucky Cavalry. McCreary joined the regiment and was commissioned as a major, the only one in the unit. The 11th Kentucky Cavalry was pressed into immediate service, conducting reconnaissance and fighting bushwhackers. Just three months after its muster, they helped the Confederate Army secure a victory at the Battle of Hartsville. In 1863, the unit joined John Hunt Morgan for his raid into Ohio. Colonel Chenault was killed as the Confederates tried to capture the Green River Bridge at the July 4, 1863, Battle of Tebbs Bend. McCreary assumed command of the unit after Chenault's death. Following the battle, he was promoted to the rank of lieutenant colonel on the recommendation of John C. Breckinridge.
Most of the 11th Kentucky Cavalry was captured by Union forces at the Battle of Buffington Island on July 17, 1863. Approximately two hundred men, commanded by McCreary, mounted a charge and escaped their captors, but they were surrounded the next day and surrendered. McCreary was taken to Ninth Street Prison in Cincinnati, Ohio, but was later transferred to Fort Delaware and eventually to Morris Island, South Carolina, where he remained a prisoner through July and most of August 1863. In late August, he was released as part of a prisoner exchange and taken to Richmond, Virginia. He was granted a thirty-day furlough before being put in command of a battalion of Kentucky and South Carolina troops. He commanded this unit, primarily on scouting missions, until the end of the war.
Following the war, McCreary resumed his legal practice. On June 12, 1867, McCreary married Katherine Hughes, the only daughter of a wealthy Fayette County farmer. The couple had one son.