Samuel P. Cox (December 16, 1828 – August 21, 1913) was an American businessman and soldier who is best remembered as the commander of the Union troops who killed "Bloody Bill" Anderson at the Battle of Albany, during the American Civil War.
 An alleged attempt to assassinate Cox in 1869 in reprisal for the killing marked the first time that Frank James and Jesse James were publicly identified as outlaws.
 Cox was born in Williamsburg, Kentucky. He moved with his parents to Daviess County, Missouri in 1839. He joined the Army during the Mexican–American War in 1847. After the war, he returned to Gallatin, Missouri and briefly settled in Grass Valley, Nevada and Oroville, California (1854–1856) before returning to Daviess County in 1857, where he was briefly a deputy sheriff. He worked for Russell, Majors and Waddell as a wagon master during the Utah War in 1858–59.
 In 1861 Cox joined the Missouri Militia with the rank of major.  During this time he was elected in absentia circuit clerk of Daviess County in 1862.  He resigned in 1863, citing ill health, and returned to Gallatin. In 1864, he returned to the Missouri Militia, this time as a lieutenant colonel of the Thirty-third Regiment of Missouri State Militia.
 On September 27, 1864, Anderson's troops seeking to assist Price's Raid, a Confederate attempt to retake Missouri in the Civil War, killed more than 100 in the Centralia Massacre. Union soldiers were scalped, mutilated, and shot at point-blank range while unarmed, prompting an all-out effort to pursue Anderson.  Among Anderson's men at Centralia were reported to be Frank James and Jesse James, although their notoriety had not been established at that point. Anderson held off the Union troops pursuing him using guerrilla attacks, by sending out small contingents which were attacked by Union troops, which in turn were overwhelmed by hidden Confederate troops.
 On October 26, 1864 in the community of Albany, Missouri (now Orrick, Missouri and unrelated to another similarly-named town).  Cox used Anderson's strategy against him, luring Anderson's men screaming the Rebel Yell to charge a seemingly vulnerable Union advance only to run into the guns of the Union lines.  Anderson was shot twice in the back of the head.  His body was taken back to Richmond, Missouri where it was placed on display.  Various reports indicated that he had a scalp on his saddle and another report indicated that Anderson had 59 knots on a rope on his horse indicating the men he had killed.
 The attacking Confederate force only had included Anderson and five or six men (although some reports say 20) and the Confederate losses in the battle including the attacking line as well as those in the rear was just 7.  Four Union soldiers were shot but no injuries were fatal.
 After the Civil War Cox returned to Gallatin, where he formed the mercantile firm of Ballinger, Cox & Kemper.  Ballinger was another military officer and J.M. Kemper, a businessman who was the father of William Thornton Kemper Sr. who went on to found two of the largest banks headquartered in Missouri (Commerce Bancshares and UMB Financial Corporation).  Cox's business relationship with Kemper only lasted one year, dissolving in 1866.
 When Cox had first joined the Missouri Militia, his commanding officer was James H.B. McFerran, who would found the Daviess County Savings Association.
 On December 7, 1869, two men (reported to be Frank and Jesse James) robbed the Daviess County Savings Association Bank and in the process shot the cashier John W. Sheets in the head and heart.  Although there was $700 in the bank the robbers left with only $5 in fractional currency.  The men were encountered near Kidder, Missouri where one of the men (believed to be Jesse) said that he was the brother of Bill Anderson and that he had avenged Anderson's murder by Cox.
 The Gallatin Bank Robbery marked the first time that Frank and Jesse were formally identified as bank robbers.  A reward of $3,000 was raised for their capture.  Jesse sent a letter to the Kansas City Times saying that he was innocent and could prove he was not in the area.  He said he would surrender but was concerned that he would be lynched before he could prove his innocence.
 During the escape from Gallatin one of the robbers (believed to be Jesse) was thrown from his horse and dragged by the stirrup and after disentangling himself rode out on the horse of the other robber (believed to be Frank).  They subsequently encountered Daniel Smoote and stole his horse.  Smoote then filed a civil suit in Daviess County against the James brothers.  They initially maintained their innocence and Jesse acknowledged the horse left in Gallatin was his but that he had sold it earlier.  Eventually the James withdrew their defenses and allowed Smoote to take possession of the horse used in the robbery.
 After Jesse James was killed in 1882, Frank James surrendered to the authorities.  Frank was not tried for the bank murder however he was tried in 1883 in Gallatin for an 1881 murder of a Rock Island Railroad employee at nearby Winston, Missouri. A jury acquitted him.
 Cox was reported to have been in California in 1869 visiting his parents and did not return until 1870 when he continued to operate other business including a hotel, livery and a different mercantile until formally retiring in 1871.  He is buried in Brown Cemetery in Gallatin.