John was a son of Alexander Stewart, Duke of Albany, son of King James II of Scotland. He was the only son of his father's second marriage, to Anne de la Tour d'Auvergne, daughter of Bertrand VI of Auvergne. The ambitious though unsuccessful Alexander had fled Scotland to France in 1479, and married Anne. He then returned to Scotland after reconciliation with his brother the king, but in 1483 fled to France a second time, being placed in Scotland under a sentence of death for treason. John was born in France, although it is unclear whether this was during his father's first or second stay there, and grew up there with his French mother.