English and Scottish: from the Breton personal name Aeruiu or Haerviu, composed of the elements haer ‘battle’, ‘carnage’ + vy ‘worthy’, which was brought to England by Breton followers of William the Conqueror, for the most part in the Gallicized form Hervé. (The change from -er- to -ar- was a normal development in Middle English and Old French.) Reaney believes that the surname is also occasionally from a Norman personal name, Old German Herewig, composed of the Germanic elements hari, heri ‘army’ + wig ‘war’.
Irish: mainly of English origin, in Ulster and County Wexford, but sometimes a shortened Anglicized form of Gaelic Ó hAirmheadhaigh ‘descendant of Airmheadhach’, a personal name probably meaning ‘esteemed’. It seems to be a derivative of Airmheadh, the name borne by a mythological physician.
Irish (County Fermanagh): shortened Anglicized form of Gaelic Ó hEarchaidh ‘descendant of Earchadh’, a personal name of uncertain origin.
Dictionary of American Family Names, Oxford University Press, ISBN 0-19-508137-4