James MacDonald was born in Lossiemouth, Moray,Scotland. He was the illegitimate son of john macDonald, a farm labourer, and Annie Ramsay, a house maid. At birth registration office his name was found as James McDonald Ramsay though he was known as Jamie MacDonald. At that time it was not a problem in the north and north-west farming communities and the rate of illegitimate child was about 15 % but it was not clear th what extent the associated stigma affected MacDonald throughout his life.
He received his elelementary education at the Free Church of Scotland School in Lossienmouth, and then from 1875 at the local Drainie Parish School. In 1881 he became a pupil teacher at Drainie and the entry in the school register as a member of staff was "J. MacDonald".He held the post upto 1 May 1885 and became an assistant to a clergymn in Bristol.
In Bristol he joined the Democratic Federation, an extreme radical sect. This Federation changed its name to to Social Democratic Federation (SDF). He remained in the group when it left the SDF to become the Bristol Socialist Society.He arrived in london for employment and became an invoice Clerk
Gradually he was involved deeply in his socialist activities.MacDonald witnessed the Bloody Sunday, 13 November, 1887 in Trafalgar Square and in response to this he had a pamphlet published by the Pall Mall Gazette entitled Remainder Trafalgar Square : Tory Terrorism in 1887.
MacDonald contitued in his Scottish politics.The Gladstone's first Irish Home Rule Bill inspired the setting up of a Scottish Home Rule Association in Edinburgh. On 6 March 1888, MacDonald took part in a meeting of Scotmen who were London General Committee of Scottish Home rule Association . He continued to support Home Rrule for Scotland but his enthusiasm for the committee waned and from 1890 he took little part in its work.
MacDonald , for economic reason, began to take evening classes in Science, botany, agriculture, mathematics and physics at thye Birkbeck Literary and Sientific institution but owing to deteriorating conditions of his health he took up employment as private secretary to Thomas lough who was a tea merchant and a radical politician. Lough was elected as the Liberal MP for West Islington, in 1892. many doors now opened to MacDonald. He had access to National Liberal Club as well as the editorial offices of Liberal and radical news paper.