Hanlon was born in Darlington, County Durham, and began his football career as a 16-year-old with his hometown club, Darlington St Augustine's of the Northern League. He moved on to Middlesbrough of the Football League First Division, and made his debut in that league on 8 September 1906 away to Woolwich Arsenal. The Arsenal won 2–0, and the Daily News reported that "Hanlon was not nearly 'class enough' at centre-half". That was his only senior appearance for Middlesbrough, and he joined North-Eastern League newcomers Shildon Athletic on a free transferin September 1907. In November of that year, the bodies of Hanlon's sister Catherine and of Margaret Annie Dickinson were found at a house in Grey Street, Darlington, where Catherine lived with two of her brothers, John and Patrick. Catherine's throat had been cut and Dickinson, the mother of John's two children, had been strangled. John Hanlon was found guilty of the murder of his sister but deemed not responsible for his actions by reason of insanity, and was detained at His Majesty's pleasure as a criminal lunatic. No evidence was offered on the charge relating to Dickinson. Hanlon helped Shildon win the Durham Challenge Cup in his first season, and remained with the club until 1910 when he moved on to Darlington, another North-Eastern League club. He established himself at wing half, and helped them progress through five qualifying rounds and eliminate First Division Sheffield United and Second Division club Bradford Park Avenue on the way to the last 16 of that season's FA Cup, an achievement which remains the club's joint best performance in the competition. They eventually lost to Swindon Town, who finished the season as Southern League champions. Hanlon was reported to have been ever-present in Darlington's North-Eastern League matches, and "was regarded as one of their strong men." He followed Darlington teammate Matt Cornock to Second Division club Barnsley in May 1911. He performed well in pre-season and for the reserve team in the Midland League, and when first-team centre-half Tommy Boyle was sold to Burnley, Hanlon took his place. Although not of Boyle's quality, he was initially viewed as an adequate replacement, and kept his place for six matches, in the last of which, away to Leeds City, he scored what proved to be his only Football League goal. After Hanlon was injured, the reserve-team right half, Phil Bratley, came into the side and made the centre-half position his own for the rest of the season. Hanlon was a regular member of the 13-man training squad that prepared for FA Cup matches as Barnsley went on to win the competition, but did not make the team. He did make a further six appearances in league competition, generally standing in for Bratley when the latter was rested before or after a Cup tie. Barnsley chose not to retain Hanlon's services, and he returned to Darlington, where he contributed to their winning the North-Eastern League title for the first time in 1912–13. In the 1914–15 FA Cup, Hanlon scored the only goal with two minutes remaining of the match against London Caledonians to take Darlington through to the first round proper, in which they faced Bradford City. The Yorkshire Post reported that in general Darlington paid the First Division club too much respect, but picked out Hanlon and Percy Sutcliffe as "effective spoilers of their opponents' tactics".
Later life
Hanlon enlisted in the Royal Engineers in 1915. In the following August, he was wounded in the thigh by shellfire at Thiepval; his injuries were such that he was medically discharged. His war experiences affected his nerves and left him prone to "terrifying" nightmares. After leaving the Army, Hanlon studied anatomy and took up a career as trainer of football teams. He held posts with Darlington, then with Third Division North club Grimsby Town during the 1923–24 season, before succeeding George Utley as trainer of Bristol City of the Third Division South in July 1924.
Death
In the early hours of 10 September 1925, Hanlon got out of bed at home apparently intending to go downstairs, but slipped and fell. He was found unconscious at the foot of the staircase, where he died of a fractured skull and laceration of the brain. The inquest jury found that the after-effects of his war service were a contributory factor in his fall. His funeral was well attended, and hundreds of people, including children from local schools, lined the route of his cortege. An appeal fund was set up to support Hanlon's widow, Kathleen, and their six children. Bristol City arranged a benefit match with First Division club Cardiff City, the previous season's FA Cup runners up, who not only sent a strong team containing five international players but also covered the expenses of the match so that the entire proceeds could go towards the appeal.