John Mackay was born in Dublin, Ireland in 1831. His surname was Scottish, but he identified with his Irish heritage. In 1840, Mackay's family immigrated to New York, his father dying shortly afterwards. John Mackay left school and eventually apprenticed as a shipwright. In 1851, he traveled to California where he gained experience mining for gold.