Harty, William (1781–1854), physician and medical writer, was born in Kilkenny city, son of Timothy Harty, gentleman; nothing is known of his mother. He entered TCD in April 1797, aged 16, and became a scholar in 1799. He graduated BA (1801) and MB (1804), and in 1808 was one of the candidates for the chair of botany at TCD but was beaten in the election by Dr William Allman (qv), FRCPI. In 1811 he was appointed physician of the Blue Coat School in Oxmantown, Dublin, and became one of the school's board of governors (1811–54). He was also appointed physician to the Dublin prisons and was elected a fellow of the RCPI in 1824 (he resigned the fellowship in 1827). In 1825 he gave evidence before a parliamentary select committee with reference to the prisons bill of that year. Profoundly interested in the care of the mentally ill, in 1829 he wrote to the commissioner of the Dublin police protesting against the policy of confining the mentally ill in the city's prisons and recommending that they should be sent instead to the Richmond Lunatic Asylum. He also established a private asylum in Finglas, to the north of Dublin.
In 1830 he graduated MD from TCD, writing a thesis on mortality rates in Dublin. He was elected an honorary fellow of the RCPI in 1833. Throughout his busy medical career he published medical texts, including Dysentery and its combinations (London, 1805) and An historic sketch of the contagious fever epidemic in Ireland in 1817–1819 (Dublin, 1820). He also wrote on typhus in Ireland and published a reaction to the Irish church temporalities act of 1833, Failure of the reformation in Ireland: by a protestant layman (Dublin, 1837). In 1847 he published a revised edition of Dysentery and its combinations. In 1851 a sensational and widely publicised court case found that Dr Harty had falsely imprisoned, on grounds of insanity, his illegitimate son, who was known as Henry William Mathew. The plaintiff was awarded £1,000. In failing health Harty resigned from his medical appointments in 1854, dying 30 March 1854 at his country residence at Ballickmoyle, Queen's Co. (Laois).
He married Maria Kent; they had one son, William, who became a barrister. At the time of his death his Dublin residence was at 8 Upper Gardiner St.; he had lived previously at 60 Eccles St. He also maintained a private asylum at Finglas House, Finglas.