Hayes, second son of Sheedy Hayes, a West Indian proprietor, by Catherine, daughter of John Westgate, was born in Judd Place, Somers Town, London, on 19 June 1805, and educated at Highgate School and at St. Edmund's Roman catholic college, near Ware. At an early age he renounced the Roman catholic religion, and became a member of the Church of England.
He was articled to William Francis Patterson, a solicitor at Leamington, and after completing his articles, in November 1824 entered the Middle Temple as a student, and in due course commenced practice as a special pleader. On 29 Jan. 1830 he was called to the bar, joined the midland circuit, and regularly attended the Warwickshire sessions, soon rising into extensive practice as a junior both at sessions and on the circuit. In sessions' appeal cases, a very lucrative part of practice, he was peculiarly successful and very largely employed. In 1856 he was made serjeant-at-law, and on 22 Feb. 1861 obtained a patent of precedence to rank next after Archibald John Stephens, Q.C. In the following December he was appointed Recorder of Leicester, and, on the promotion to the bench of Mr. Justice Mellor, Hayes henceforth divided the lead of the midland circuit with Kenneth Macaulay, Q.C. For cases before a common jury Hayes was not well adapted, as his reasoning was too subtle and his wit too refined. Before special juries he was much more successful; every word and gesture usually had their effect, and in the famous Matlock will case, where he was the leader, the decision was greatly due to his extensive knowledge of the law and his masterly dissection of the evidence. His knowledge of the English classics was extensive and accurate, and he was well read in Latin, Greek, French, and Italian.
On 9 Aug. 1868, under an act passed for the appointment of additional judges, he was named a justice of the court of queen's bench, sworn in on 24 Aug., and knighted by the queen at Windsor Castle on 9 Dec. On 19 Nov. 1869, after sitting all day in the bail court at Westminster, he was seized with paralysis, and being removed to the Westminster Palace Hotel, died there on 24 Nov. He married, on 3 Sept. 1839, Sophia Anne, eldest daughter of John Hall (or Hill), M.D., of Leicester, by whom he left four sons and four daughters.
He was the author in 1854 of an elegy in which he humorously lamented the extinction of John Doe and Richard Roe from the pleadings in ejectment. His song on the celebrated case of the 'Dog and the Cock' was set to music, and occasionally sung by himself.