Cocke married Catherine Parkhill in 1852 and moved to her home in Leon County, Florida.
[4] Cocke continued his private practice in Florida until the beginning of the American Civil War, when he accepted a high-profile position in the Confederate States Department of the Treasury in Richmond.
[3] In 1868, Republican governor Harrison Reed appointed Cocke as a judge to the First Judicial Circuit.
He served in this position until January 16, 1873, when newly elected Republican governor Ossian B. Hart appointed him to be the Florida Attorney General, mostly as a result of Cocke's support of Hart and Republican president Ulysses S. Grant during the 1872 election.
[6] Grant chose not to seek a third term as President and the 1876 presidential election would decide his successor.
However, on December 14, 1876, the Florida Supreme Court, though consisting of several Republicans, filed a writ of mandamus with the returning board as a result of the obvious corruption in the counting of votes, particularly in Manatee County, where votes were so fraudulent the proper result could not be determined.
It was determined that the writ applied to only McLin and Cowgill, as Cocke used proper discretion and was exceedingly nonpartisan.