 He was born John MacKenna (or Seán Mac Cionath in Irish) in Monaghan, Co. Monaghan, Ireland, the son of William MacKenna of Willville House near Monaghan town and Eleanora O'Reilly and, on his mother's side, a nephew to Count Alejandro O'Reilly.Count O'Reilly took an interest in the young Mackenna and took him to Spain where he studied at the Royal School of Mathematics in Barcelona.He also trained in the Royal Military Academy as a Military Engineer between 1785 and 1791.