Dunlop joined Liverpool for a fee of £35 in January 1895. Other players in the side at that time included George Allan, Jimmy Ross and Tom Bradshaw. A left-back, Dunlop helped the club win the Second Division championship that year.
At the beginning of the 1898-99 season Liverpool sold Tom Bradshaw but brought in several new players including Alex Raisbeck and Rab Howell. A local youngster, Jack Cox, established himself as the first-team outside-left. Despite the loss of George Allan Liverpool finished in second place in the First Division.
Liverpool won the First Division championship in 1900-01. The stars of the side included Dunlop, Sam Raybould, John Walker, John Robertson, Jack Cox, Alex Raisbeck and Rab Howell. According to Tony Matthews (Who's Who of Liverpool): "Dunlop was the backbone of Liverpool's defence. A fine tackler and splendid in the air, he was also a clean kicker of the ball, always seeking to find a colleague rather than heaving his clearance 80 yards downfield in hope rather than judgement."
Over the next few years Liverpool struggled and in the 1903-04 season the club was relegated into the Second Division. In 1904 Liverpool signed Ted Doig from Sunderland for a fee of £150. In his first season with the club he helped them gain promotion to the First Division of the Football League.
Liverpool won the First Division title in the 1905-06 beating Preston North End by four points. That year Dunlop won his first and only international cap for Scotland against England. Scotland won the game with two goals from Jimmy Howie.
William Dunlop died in Sunderland in 1945.