In 1892 MacdDonald was in Dover to give support to the candidate for the the Labour electoral Association (LEA) who was well defeated but MacDonald was successful in impressing the Press and was adopted as its candidate.He announced that he was a candidate under a Labour Party banner and denied that the Labour party was a wing of the Liberal Party though both of them has a relation. In May 1894 MacDonald became a member of the Independent Labour Party (ILP) formed in 1893 by Keir Hardie and became a candidate for one of the Southampton seats . He was not successful but again stood for Parliament in 1900for one of the two Leicestor seats. This time he also was loser and was accused of splitting liberal vote allowing a conservative candidate to win. That same year he became the Secretary of Labour Representation Committee (LRC), the forerunner of the Labour Party and retained his membership of the ILP, not a Marxist party, but more rigorously socialist.As Party Secretary he negotiated an agreement with the leading Liberal politician Herbert Gladstone, son of the late Prime Minister William Edward Gladstone, which allowed to contest a number of working -class seats without Leberal opposition. This time Labour party had its first breakthrough into the House of Commons.
He married Margaret Gladstone, not related to Gladstone of Liberal party, in 1896 and was very comfortably off and allowed them to indulge in foreign travel, visiting Canada and the United States in 1897, South Africa in 1902, Australia and New Zealand in 1906 and to India several times.
in 1906 LRC changed its name to the Labour Party and absorbed the ILP. In that same year MacDonald was elected MP for Leicester along with 28 others and became one of the leaders of Paliamentary Labour party. they had an alliance with Liberals and supported the Govt. of Herbert Henry Asquith.