Charles Locock was born to Henry Locock and his wife Susannah Smyth in Northampton. He studied under Benjamin Brodie and Andrew Duncan, graduating from medical school at Edinburgh University in 1821. Locock became a licensed doctor of the Royal College of Physicians in 1823 and a fellow in 1836. He opened his own obstetrical practice, which became the largest in London. In 1840 he became the first obstetrician to Queen Victoria, and was the attending doctor for the births of all her children. In 1842 he was elected a Fellow of the Royal College of Physicians. He published an 1857 paper in The Lancet outlining the use of potassium bromide as a treatment for epilepsy.
In 1860 Locock had a key role in the sensational judicial case known as The Eastbourne manslaughter. It was Locock who conducted the autopsy establishing that the 15-year-old Reginald Cancellor had died as the result of corporal punishment at the hands of his teacher, Thomas Hopley – which led to Hopley being eventually sent to four years in prison on charges of manslaughter.
Locock married Amelia Lewis on 5 August 1826; the couple had five sons. He retired from medicine in 1857 and was created a baronet. He also became the 26th president of the Royal Medical and Chirurgical Society. Locock became involved in politics, acting as a justice of the peace for Kent and standing as a Conservative candidate for the Isle of Wight in the 1864 election (he lost). He was elected a fellow of the Royal Society the same year.
Locock's third son Frederick Locock (1831–1910) married, apparently without the knowledge of his family, by licence at the Countess of Huntingdon's Chapel, North Street, Brighton, on 28 August 1867, Mary Blackshaw, who described herself as the daughter of Abraham Blackshaw, gentleman, but in reality was the illegitimate daughter of a labourer of that name. She was, it seems, the mother of two illegitimate children. The couple adopted a boy, Henry Frederick Leicester Locock, who was born on 30 December 1867 and who was probably their child, but who subsequently told his children that he was the son of Princess Louise. The Princess apparently took some interest in the boy after Mary's early death in 1874. In 2004 an application by Henry Frederick's grandson to use his grandfather's remains in the churchyard at Sevenoaks for DNA purposes was rejected by the Court of Arches, the highest church court, because 'he had failed to show there was a real likelihood of a connection having existed between his grandfather and Princess Louise'. The claims had already been rejected by Lady Longford, the editor of the Princess's correspondence  and, after examination in some detail, were again dismissed by Anthony Camp as 'fiction' in 2007, but were revived without new evidence by the art historian Lucinda Hawksley in 2013.
Locock was succeeded in the baronetcy by Charles Brodie Locock, born 1827, in 1853 barrister of Lincoln's Inn. Son Sidney (1834-1885), was the British minister resident in Servia from 1881 till his death on 30 Aug. 1885. His fifth son was eventually to be commissioned Colonel Herbert Locock (1837-1910) in the Royal Engineers; while in that post he co-authored the Drainage Manual.
- Bettany, GT (2004). "Locock, Sir Charles". Oxford Dictionary of National Biography. Oxford University Press. Retrieved 28 March 2011.
- Locock C. Discussion of paper by Sieveking EH. Analysis of fifty-two cases of epilepsy observed by the author. Lancet 1857; 1: 528
- "Library and Archive Catalogue". Royal Society. Retrieved 6 March 2012.
- UK | England | Royal mystery exhumation refused. BBC News (8 November 2004). Retrieved on 2 June 2014.
- Longford, Elizabeth (1991) Darling Loosy, Letters to Princess Louise, 1856–1939. Weidenfeld & Nicolson. ISBN 0297811797
- Camp, Anthony (2007) Royal Mistresses and Bastards, Fact and Fiction, 1714–1936. ISBN 0950330825. pp. 379–381.
- Hawksley, Lucinda (2013) The mystery of Princess Louise: Queen Victoria's Rebellious Daughter. Chatto & Windus. ISBN 0701183497