Foley was a native of Galbally, County Limerick and was 23 years of age at the time of his execution. He was an active member of the Galtee Battalion of the East Limerick Brigade of the IRA.
Arrest, trials and execution
Foley along with colleagues from the Galtee Battalion of the East Limerick Brigade: Ned O'Brien, James Scanlon, John Joe O'Brien, and Sean Lynch, had taken part in the rescue of IRA member Seán Hogan from a train at KnocklongRailway Station on 13 May 1919, along with Hogan's comrades from the 3rd Tipperary Brigade: Sean Treacy, Séumas Robinson and Dan Breen. Seán Hogan was handcuffed and seated between four armed members of the Royal Irish Constabulary. Two members of the RIC were killed in the fight and several members of the rescuing party injured, while Hogan was successfully rescued. Hogan had been captured a day earlier following the Soloheadbeg ambush. The beginning of the Irish War of Independence is generally traced to the events at Soloheadbeg. After going on the run for a number of months, Foley was arrested and charged with two counts of murder for the two men killed at Knocklong. Foley and another volunteer, Patrick Maher, were tried three times for these murders with juries failing to reach verdicts on two occasions. Their third trial was by court martial on the 15 March 1921 in Dublin and both were convicted of murder. Among the many who appealed for clemency was the father of one of the Royal Irish Constabulary men killed at Knocklong, Sergeant Peter Wallace. Nonetheless, both Foley and Maher where hanged on 7 June 1921. Foley and Maher made a joint, final statement just hours before their deaths: "Fight on, struggle on, for the honour, glory and freedom of dear old Ireland. Our hearts go out to all our dear old friends. Our souls go to God at seven o'clock in the morning and our bodies, when Ireland is free, shall go to Galbally. Our blood shall not be shed in vain for Ireland and we have a strong presentiment, going to our God, that Ireland will soon be free."
Reinterment
Foley is one of a group of men hanged in Mountjoy Prison in 1920-21 commonly referred to as The Forgotten Ten. In 2001 he and the other nine, including Kevin Barry, were exhumed from their graves in the prison and given a full State Funeral. He is now buried in Glasnevin Cemetery, Dublin.