Here is the surname history for Hegarty from the Irish Ancestors site run by the Irish Times:
In Irish the surname is Ó hEigceartaigh, from eigceartach, meaning “unjust”. The name appears to have arisen first in the area now divided between counties Derry and Donegal, where the Ó hEigceartaigh were a branch of the Cinel Eoghain, that large group of families claiming descent from Eoghan, one of the sons of Niall of the Nine Hostages, the fifth century monarch who supposedly kidnapped St. Patrick to Ireland. However, today the surname is much more common in Co. Cork, at the other end of the country. Traditionally, the Cork (O’)Hegartys were claimed as a branch of the more historically prominent northern family, but ecertach was a common personal name in Munster, and it seems more likely that the surname arose separately there. At any rate, O’Hegartys are recorded in west Cork as early as the thirteenth century, and remain strongly associated with the area. (“Hegarty”)
My Hegarty family emigrated from Cork to Cambridge, Massachusetts and lived there and in the neighboring town of Somerville. There are several Hegarty families in this area, but the others are, so far as I know, unrelated to me.
1st & 2nd generations: me and my father
3rd generation: my grandfather:
Michael John Hegarty was born on 11 March 1898 in Cambridge, Middlesex County, Massachusetts. His parents were John James and Margaret Teresa (Deasy) Hegarty (MVR 1898). According to the 1920 and 1930 census, he worked at printing presses. His World War I-era draft card indicates that at least for some time he worked at the Murray Printing Company in Cambridge.In 1925 he married Agnes Murphy of Cambridge (1930 Census). They had seven children. They lived on Beacon Street in Somerville. Sometime after 1930 Michael started working in the boiler room at the General Electric plant in Cambridge, where his father had worked in a more technical position (Hegarty, J.). In 1947, they moved to Bartlett Street in Somerville. Michael died of cancer on 15 October 1970 in Somerville, Massachusetts. (MDI, SSDI)  He is buried at the Puritan Lawn cemetery in Peabody, Massachusetts (Puritan).
4th generation: my great-grandfather:
John James Hegarty was born on 15 December 1867 in Gillabbey Lane in Cork City, Ireland.  His parents were Michael and Ellen (Cronin) Hegarty. He was baptized in St. Finbar’s Roman Catholic Church; his godparents were Thomas Murphy and Julia Cronin. Family lore had it that prior to emigrating John served in the British Army, and I have found a UK War Office record for a Pvt. J. Heggarty who served with the Royal Malta Artillery in the Sudan Campaign from 1884-1886. In April 1890 he emigrated to Boston, Massachusetts aboard the Cephalonia (Boston). On 24 April 1895, he married Margaret Teresa Deasy in Somerville, Massachusetts, probably at St. Joseph’s Roman Catholic Church (MVR 1895). From reading the censuses of the next 30 years, we see that the young family moved around quite a bit between rentals in Cambridge. John began working as a stoker but eventually became an engineer at Cambridge Electric. In 1930, he was still working as an engineer and had bought a multi-family house on North Beacon Street in the Brighton neighborhood of Boston.  John died on 20 June 1947 in Brighton, Massachusetts. (Hegarty, H.)
John had the following children (3rd generation):
- Helen Frances Hegarty b. 1896 Cambridge, MA, d. 1970 Brighton, MA. (1900 census, SSDI). She kept a family history notebook which was helpful to this current project.
- Honora Agnes Hegarty b. 1897 Cambridge, MA, m. 1922 John J. Cauley of MA, d. 1984 Beverly, MA (1900 census, 1920 census, SSDI, MDI)
- Michael John Hegarty, see above
- Theresa Helen Hegarty b. 1899 Cambridge, MA, m. 1923 William Williamson of England, d. 1995 Foxboro, MA (1900 census, 1930 census, MDI, SSDI)
- James Leo Hegarty b. 1901, d. 1952 Cambridge, MA (1910 census)
- Margaret Mary Hegarty b. 1902 Cambridge, MA, m. 1924 Charles Sjosdedt of MA, d. 1987 Somerville, MA (MDI, 1930 census)
- Joseph Thomas Hegarty b. 1904 Cambridge, MA, m. 1928 Anne McHugh, d. 2002 Wellesley, MA (1910 census, MDI, SSDI)
- William Lawrence Hegarty b. 1909 Cambridge, MA, m. 1934 Mary Christine Sullivan, d. 1980 Brighton, MA (1910 census, SSDI)
- Francis Augustine Hegarty b. 1916 Cambridge, MA, m. 1947 Edna Ritterbush of Boston, MA, d. 1995 Brockton, MA (MDI, SSDI, 1930 census, Find A Grave)
Michael Hegarty was born in Cork in November 1849. (St. Finbar’s). His parents were Julia (Fitzgerald) and John Hegarty. Michael married Ellen Cronin on 28 July 1866 at Ss. Peter & Paul Roman Catholic Church in Cork City, Ireland. He worked as a laborer. (Ireland Marriages)
Michael had the following children (4th generation):
- John James Hegarty, see above.
- Julia Hegarty b. 1869 Cork City, Ireland, emig. 1890, m. 1894 in New York City to Thomas King of England (Ireland Births, 1900 census)
- Ellen Hegarty, b. 1871, Cork City, Ireland. (Ireland Births)
- Cornelius Hegarty b. 1873 Cork City, Ireland. (Ireland Births)
- Elizabeth Hegarty b. 1875 Cork City, Ireland, m. Michael Phipps of Cork City (St. Finbar’s, Ireland Births, Census of Ireland 1901)
- Lena Hegarty b. 1875 Cork City, Ireland, emig. Massachusetts 1892, m1 Robert Foster of Massachusetts, div.; m2 1900 Frank Daniels of Massachusetts (1900 census, 1910 census) .
- Daniel Hegarty b. 1877 Cork City, Ireland (Ireland Births)
- Hanora Hegarty b. 1878 Cork City, Ireland (St. Finbar’s, Ireland Births)
- Michael Hegarty b. 1880 Cork City, Ireland (St. Finbar’s)
- Family papers name another six children for this marriage, all of whom are said to have died young. The names are Patrick Hegarty, Jeremiah Hegarty, Timothy Hegarty, Mary Kate Hegarty, Albina Hegarty, and Margaret Hegarty.
John Hegarty was born in Ireland, probably in Cork. He married Julia Fitzgerald in Cork City on 12 Jan 1849 (St. Finbar’s). He was named in his son Michael’s marriage record.
1. Michael John Hegarty’s birth information is derived from Massachusetts vital records compiled by the Massachusetts State Archives and placed online by Ancestry.com , AmericanAncestors.org, and FamilySearch.org, and also from the US census for 1900 and 1910. Various spellings of his name in official records include Hagerty and Haggerty. AmericanAncestors.org, administered by the New England Historic Genealogical Society, presents the database Massachusetts Vital Records, 1841-1910, which I will abbreviate in parenthetical citations as MVR followed by the year of the record. Michael John Hegarty’s death is derived from personal knowledge and from the death indices of the Massachusetts Department of Health Services (abbreviated MDI) and the Social Security Administration (abbreviated SSDI).
2. John James Hegarty’s birth information is derived from his birth certificate and St. Finbarr’s parish records.
3. The 1930 census shows a Burke family as renters at the same address.
4. Lena Hegarty’s birthdate is calculated from the age she gave on the census, so that while it may conflict with her sister’s birthdate here, there is probably wiggle room.
Boston Passenger and Crew Lists, 1820-1943. Provo, UT: Ancestry.com, 2006. Web, PDF file.
Commonwealth of Massachusetts. Dept. of Health Services. Massachusetts Death Index, 1970-2003. Boston, MA, 2005. Ancestry.com. Web. July 2011.
—. Massachusetts State Archives. Massachusetts Birth Records, 1841-1915. Vol. 476. 1898. p. 130. FHL microfilm 1843705. FamilySearch.org. Web. July 2011.
—. Massachusetts Vital Records, 1841-1910. Vol. 452, 1895. p. 108. AmericanAncestors.org. 2004. Web. August 2011.
—. —. Vol. 476. 1898. p. 130. AmericanAncestors.org. 2004. Web. July 2011.
Eire [Ireland]. Census of Ireland 1901. Cork, Co. Cork. National Archives of Ireland. Web.
—. Registration of Births, Deaths and Marriages. Certified copy of entry in the Register Book of Births for District 7.S.W., the City of Cork, Co. Cork. Entry No. 86 for John Hegarty, born 1867. Certified 29 Dec. 1939. Photocopy.
Find A Grave. Web.
Hegarty, Helen. Family history notebook. N.d. MS. Photocopy.
Hegarty, James. Personal interview. August 2011.
“Hegarty.” Surname information. Irish Ancestors. Irish Times. Web. August 2011.
Ireland Births and Baptisms, 1620-1881. FamilySearch.org. FHL#101204. Record for Julia Hegarty.
—. FHL# 255831. Record for Ellen Hegarty.
—. FHL# 255882. Record for Cornelius Hegarty.
—. FHL# 255926 Record for Elizabeth Hegarty.
—. FHL# 255976. Record for Daniel Hegarty.
—. FHL# 256019. Record for Hanora Hegarty.
Ireland Marriages, 1619-1898. FamilySearch.org. FHL 101499. Marriage registration for Michael Hegarty and Ellen Cronin. I also have a photocopy of the page in the microfilm; it’s a copy of a civil registration form for the marriage.
New York Marriages, 1686-1980. FamilySearch.org. FHL 1493124. Record for Julia Hegarty and Thomas King.
Puritan Lawn Memorial Park. “Michael J. Hegarty.” 2011. Web. 23 May 2011.
St. Finbar’s South Church, South Parish, Roman Catholic Diocese of Cork and Ross. [Cork City, Co. Cork, Ireland] Baptism Records for 1849. File number CR-RC-BA-98110. Irish Genealogy. Web, PDF file. 24 November 2012.
—.—.—. Baptism Records for 1867. File number CR-RC-BA-112161. Irish Genealogy. Web, PDF file. 22 May 2011.
—.—.—. Baptism Records for 1875. File number CR-RC-BA-117963. Irish Genealogy. Web, PDF file, 22 May 2011.
—.—.—. Baptism Records for 1878. File number CR-RC-BA-120927. Irish Genealogy. Web, PDF file, 22 May 2011.
—.—.—. Baptism Records for 1880. File number CR-RC-BA-122384. Irish Genealogy. Web, PDF file, 22 May 2011.
—.—.—. Marriage Records for 1849. File number CR-RC-MA-17219. Irish Genealogy. Web, PDF file. 24 November 2012.
United Kingdom. War Office. Campaign Medal and Award Rolls 1793-1949. National Archives microfilm digitized on Ancestry.com as UK, Military Campaign Medal and Award Rolls, 2010.
United States. Bureau of the Census. Twelfth Census of the United States, 1900. Washington, D.C.: National Archives and Records Administration, 1900. Roll T623_656. p. 20B. ED 675: Cambridge Ward 1, Middlesex Co., Massachusetts. Ancestry.com. 2004. Web. July 2011.
—.—.—, 1900. Roll: T623_ 656; Page: 19B; Enumeration District: 675: Cambridge Ward 1, MIddlesex Co., Massachusetts. Ancestry.com, 2004. Web. 2011.
—.—. —, 1900. Roll: T623_ 1106; Page: 1B; Enumeration District: 555. Manhattan, New York, New York. Ancestry.com. 2004. Web. 2011.
—.—. Thirteenth Census of the United States, 1910. Washington, D.C.: National Archives and Records Administration, 1910. Roll T624_597. p. 20A. ED 766: Cambridge Ward 7, Middlesex Co., Massachusetts. Ancestry.com. 2006. Web. July 2011.
—.—. —, 1910. Roll: T624_596. p. 7B. ED 1932. Cambridge Ward 6, Middlesex Co., Massachusetts. Ancestry.com. 2006. Web. 2011.
—. —. Fourteenth Census of the United States, 1920. Washington, D.C.: National Archives and Records Administration, 1920. Roll T625_708. p. 1A. ED 62: Cambridge Ward 6, Middlesex Co., Massachusetts. Ancestry.com. 2010. Web. July 2011.
—. —. Fifteenth Census of the United States, 1930. Washington, D.C.: National Archives and Records Administration, 1930. Roll 927. p. 14B. ED 416: Somerville, Middlesex Co., Massachusetts. Ancestry.com. 2002. Web. July 2011.
—. —. —, 1930. Roll 959. p. 4B. ED 253: Boston, Suffolk Co., Massachusetts. Ancestry.com. 2002. Web. Nov. 2011.
—. Selective Service System. World War I Selective Service System Draft Registration Cards, 1917-1918. Washington, D.C.: National Archives and Records Administration. Draft Board 3: Middlesex County, Massachusetts. [FHL?] Roll 1685072. Ancestry.com. Web. July 2011.
—. Social Security Administration. Social Security Death Index, Master File. Ancestry.com. 2011. Web. July 2011.