A by-election was held for the New South Wales Legislative Assembly electorate of University of Sydney on 5 October 1876 because of creation of the district. The Electoral Act 1858 (NSW) provided that the district would be established once there were 100 people who had graduated from the University of Sydney with a Doctor of Laws, Doctor of Medicine or Master of Arts. In June 1876 the University an additional graduate with a Doctor of Law and 10 with a Master of Arts, bringing the total to 111. Voting was restricted to members of the university senate, professors, public teachers and examiners, the principals of incorporated colleges within the university, masters of arts, doctors of laws or medicine and members of the University who were entitled to vote for the university senate.
While there was no qualification for candidates, William Windeyer graduated with a Master of Arts in 1859, and Edmund Barton had graduated with a Master of Arts in 1870.