John Grayson was born in Kentucky in 1806 to Alfred W. Grayson and Letitia Breckinridge at the Breckinridge family estate of "Cabell's Dale". After his father's death when he was around ten John's mother married Peter Buell Porter. Grayson was appointed to West Point through his ties to three very powerful families the Breckinridges, Graysons, and Porters. He graduated in 1826 and became a second lieutenant in the artillery. He was first assigned to Fort Monroe where he remained for six years. He then served in a variety of southern forts from 1832 to 1835. In 1835 the Second Seminole War broke out in Florida. John fought at Camp Izard and then at the Battle of Oloklikaha. After the Seminole War Grayson was assigned to New Orleans for eleven years. In 1847 Grayson left to fight in the Mexican-American War where he arrived as a captain of the artillery. John later became the Chief Commissariat of Major General Winfield Scott. Grayson fought in many battles in Mexico including the Siege of Veracruz, Battles of Cerro Gordo, Contreras, Churubusco, Molino del Rey, Chapultepec, and the capture of Mexico City. He became a major for his bravery at the battles of Contreras and Churubusco in 1847. Later that year Grayson was brevetted to lieutenant-colonel for his actions at the Battle of Chapultepec. After the war John Grayson was assigned to Detroit, Michigan where he became the Chief of Commissariat for seven years from 1848 to 1855. He would hold this same in New Mexico until he resigned to join the Confederate Army.