McAvoy was elected to Parliament in 1987 as the Scottish Labour and Co-operative Member for Glasgow Rutherglen. From 2005 to 2010, he sat as the member for Rutherglen and Hamilton West. He was an opposition whip from 1990 to 1993 and again from 1996 to 1997. When the Labour Party came into government in 1997, McAvoy was appointed as Comptroller of HM Household, the third highest position in the Government Whips' office. He retained the same job until 2008, becoming one of the longest serving Comptrollers in history. He was appointed to the Privy Council in 2003. In October 2008, he was promoted to Treasurer of the Household and Deputy Chief Whip. McAvoy has achieved the rare feat among whips of remaining popular with Labour MPs. An early day motion in July 2006 noted "the difficult task he has of securing government business whilst accommodating the parliamentary, political and personal requirements of 352 Labour colleagues" and congratulated him for "the respect he has earned from all sides of the House for his ability to perform these duties"; it was signed by 135 MPs. On 20 February 2010, McAvoy announced that he would stand down at the next general election. The seat was retained by Labour with the election of Tom Greatrex. On 22 June 2010, McAvoy was created a life peer as Baron McAvoy, of Rutherglen in Lanarkshire, and was introduced in the House of Lords that day. He remains to this day the longest serving Government Whip in the history of parliament with 13 years and 10 days service in the Government Whips Office. According to The Guardian: "... personal crusades have been for peace in Northern Ireland and against abortion". Since his introduction to the Lords, he has served as a Senior Whip. In 2012, he took on the role of Opposition Spokesman for Scotland and Northern Ireland. In May 2015, after the election of Angela Smith as Leader of the Opposition in the Lords, he took over as Opposition Deputy Chief Whip in House of Lords, serving with Denis Tunnicliffe. On 24 January 2018, he was elected Labour Chief Whip in the House of Lords and therefore Opposition Chief Whip, taking over from Steve Bassam.
Personal life
McAvoy and his wife Eleanor have four sons. He was a school friend of Bobby Murdoch, later a successful footballer with Celtic and Scotland. His brother Eddie McAvoy is a retired local politician who also worked at Hoover and subsequently served as the leader of South Lanarkshire Council from 1999 to 2017.