Cocke was born in 1672 in Sudbury, Suffolk County, England, and probably was the son of William Cocke and Susan Cocke, whose maiden name is not known. He attended Felsted School near London and in March 1688 entered Queens’ College, University of Cambridge, from which he received a medical degree in 1693. Before November 1700 he married Elizabeth Catesby, also of Sudbury, without her father’s consent. They had two sons and at least three daughters.In the spring of 1710 Cocke traveled to Virginia as personal physician to Lieutenant Governor Alexander Spotswood. They arrived in June of that year, and within a few days Cocke chanced to meet William Byrd (1674–1744), with whom he had attended Felsted School. Byrd’s diaries record that Cocke was a frequent visitor at Westover and that Byrd regularly met Cocke in . Conflicting political loyalties during the tumultuous early years of Spotswood’s administration might have strained their friendship, but they evidently remained on good terms until Cocke died. Cocke resided in or near Williamsburg, perhaps as a member of Spotswood’s household, until his wife, two of their children, and his wife’s younger brother, the naturalist Mark Catesby, arrived in April 1712. Cocke purchased eight lots and a house in the capital, and Catesby lived with them for about seven years while beginning his botanical and zoological collecting trips in Virginia and the West Indies.
Perhaps one of the few university-trained doctors in Virginia, Cocke practiced medicine with some success. Without any known administrative or political experience, he also moved rapidly into the upper ranks of Virginia officialdom. In April 1711 Spotswood unsuccessfully tried to arrange his election to the board of visitors of the College of William and Mary, but the following year he engineered a deal whereby Cocke replaced(d. 1727), who was temporarily returning to England, as secretary of the colony. Cocke took the oaths of office at the Capitol in Williamsburg on June 10, 1712. On the recommendation of Spotswood and Governor George Hamilton, earl of Orkney, the Privy Council in August 1713 approved Cocke’s appointment to a vacant seat on the governor’s Council. Cocke was one of three Council members who in November 1714 with members of the drafted the colony’s address to congratulating him on assuming the throne. Spotswood appointed Cocke county lieutenant, or commander of the militia, of Elizabeth City and Warwick counties in 1715.
Except when he was in England from the summer of 1716 to the spring of 1718, Cocke regularly attended meetings of the Council, which was also the upper house of the General Assembly and the General Court, the colony’s highest court, which met twice a year. Few records exist to characterize what effect he had on the secretary’s office, but in 1716 Spotswood reported that Cocke “applyed himself to the reforming sundry abuses” in the office. Because Cocke continued to practice medicine both in and out of Williamsburg, it is possible that he left the day-to-day business of issuing writs, managing land office records, and commissioning county clerks to a skilled deputy, who collected and kept a portion of the many lucrative fees to which the secretary was entitled.
Whether Cocke’s two-year absence from Virginia was occasioned by personal or official business in England is not known, but Spotswood provided him with a letter of introduction praising his dedication and skill and employed him to deliver official documents to theand to explain the need for a new colonial seal. At that time, Spotswood and most members of the Council were at loggerheads over proposed changes in the collection of quitrents and whether the lieutenant governor could appoint anyone other than a Council member to the semiannual courts of oyer and terminer. On November 15, 1717, both Byrd, an opponent of Spotswood, and Cocke, who remained loyal to the lieutenant governor, appeared before the Board of Trade, which was considering the complaints that Council members and Spotswood had filed against one another. While in London, Cocke was authorized to oversee the printing of a new compilation of Virginia statutes in force and also advised the Board of Trade that a Virginia law concerning debts and another preventing the assembly of Quakers were both contrary to the laws of England. He warned that the latter might banish “numbers of Industrious Inhabitants” from Virginia.
Cocke and his family appear to have lived comfortably in Virginia. In addition to his town lots, house, and other buildings in Williamsburg, he owned forty acres of land in James City County and with several partners patented tracts of 6,000 and 4,000 acres in Essex County. He entertained friends, regularly engaged in games of chance, owned a coach, had servants, and may have owned slaves. Cocke never came close to the imprisonment for debt that his skeptical father-in-law had predicted at the time of his marriage, but there is evidence that he lived beyond his means. His medical practice brought in a respectable £200 annually and the secretary’s office even more, although he had to share that income with Jenings and had to pay his deputies. Cocke was noted for his generosity to friends and his reluctance to accept payment from them for his medical services. He eventually mortgaged his Williamsburg home and his land in James City County, which were sold to satisfy the debt they secured. After his death, his widow was left with few resources, and she was forced to come to an arrangement with her eldest son and married daughter to provide for the other children.
On October 22, 1720, while attending a session of the General Court, William Cocke “was struck with a fit of an apoplexy and died immediately,” collapsing onto William Byrd. The lieutenant governor, Council members, and other dignitaries attended Cocke’s funeral two days later. He was buried under the floor near the altar in Bruton Parish Church, in Williamsburg. In 1724 Cocke’s widow married John Holloway, Speaker of the House of Burgesses. About thirty years later, Cocke’s son ordered for the church an inscribed tablet that recorded Cocke’s birth, public services, and death.