Cockle was born on 14 January 1819. He was the second son of James Cockle, a surgeon, of Great Oakley, Essex. Educated at Charterhouse and Trinity College, Cambridge, he entered the Middle Temple in 1838, practising as a special pleader in 1845 and being called in 1846. Joining the midland circuit, he acquired a good practice, and on the recommendation of Chief Justice Sir William Erle he was appointed as the first Chief Justice of the Supreme Court of Queensland in Queensland, Australia on 21 February 1863; he served until his retirement on 24 June 1879. Cockle was made a Fellow of the Royal Society (FRS) on 1 June 1865. He received the honour of knighthood on 29 July 1869. He returned to England in 1878.