The history of association football, more commonly known as football or soccer, stretches back to at least medieval times. FIFA cites Cuju in ancient China as the earliest form of a kicking game for which there is historical evidence, a military manual from the Han dynasty. Other ball games were played in ancient Japan, Greece, and Rome. The first written evidence of a football match came in England in about 1170.

The development of association football has its origins in medieval ball games and English public school games. The modern game of association football originated in the mid-nineteenth century by the efforts of English football clubs to standardize the varying sets of football rules, culminating in the formation of The Football Association (The FA) in London, England, in 1863, and their issuing of the Laws of the Game in the same year. The "Laws of the Game" were later trusted to the International Football Association Board (IFAB) and then adopted by the International Association Football Federation (FIFA). This set of rules drafted by The FA allowed clubs to play each other without dispute, and banned a number of contentious practices, notably both hacking and handling of the ball (except by goalkeepers) during open play. After the fifth meeting of the Association, a schism emerged between association football and the football played by the rules of Rugby School, which later became rugby football.

Besides its dedicated competitions, football has also been an Olympic sport since the second modern Summer Olympic Games in Paris, France, in 1900.

The Football Association

During the early-mid nineteenth century, different sets of rules for football began to be drawn up in schools, universities, and clubs. The first such set of rules to be published was that of Rugby School in 1845, with other early written and codified rules known to exist at Eton College for its field game (1847), at Shrewsbury School (1855) and at Uppingham School (1857).

According to N. L. Jackson, in the University of Cambridge in 1846 "two old Shrewsbury boys, Messrs H. de Winton and J. C. Thring, persuaded some Old Etonians to join them and formed a club. Matches were few and far between, but some were played on Parker's Piece. Unfortunately, the game was not popular at the Varsity then, and the club did not last long".Jackson (1900), p. 26. Jackson does not provide the original source of this information. According to Thring's own account, written in 1861:

This was among the first of several known attempts to formulate a set of "compromise" rules of football at Cambridge between alumni of different schools. In his History of the Football Association, Geoffrey Green describes it as "the first positive step to create an identity of views and a common code of laws [of football] acceptable to as many as possible," and laments the absence of a plaque "to commemorate this historic moment". These rules underwent several revisions, and in 1848 a new set of rules was created for use at the University of Cambridge, drawing from features present in the different public school games. A later set of "Cambridge Rules" from 1856 survives in a copy at Shrewsbury School.Curry and Dunning (2015), p. 73

During the 1850s, many clubs unconnected to schools or universities were formed throughout the English-speaking world, to play various forms of football. Some came up with their own distinct codes of rules, most notably the Sheffield Rules, created by the Sheffield Football Club, formed in 1857, which were adopted by the newly formed Sheffield Football Association in 1867.

During the early 1860s, there were increasing attempts in England to unify and reconcile the various football games that were played in the public schools as well in the industrial north under the Sheffield Rules. In 1862, J. C. Thring, who had been one of the driving forces behind the original Cambridge Rules, was a master at Uppingham School and issued his own rules of what he called "The Simplest Game" (aka the Uppingham Rules). In early October 1863, a new set of "Cambridge Rules" was drawn up by a seven-member committee representing former pupils of Eton, Harrow, Shrewsbury, Rugby, Marlborough and Westminster.

Ebenezer Cobb Morley, a solicitor from Hull, wrote to Bell's Life newspaper in 1863, proposing a governing body for football. Morley was to become the FA's first secretary (1863–66) and its second president (1867–74), but is particularly remembered for writing the first draft of what would become the FA’s Laws of the Game at his home in Barnes, London, the successor rules of which are today adhered to the world over, wherever football is played. For this, he is considered not just the father of the Football Association, but of association football itself.

Public schools such as Charterhouse and Westminster School were to prove, in time, particularly influential with regard the new laws of the game. At both schools the pupils' surroundings meant they were confined to playing their football in the cloisters, making the rough and tumble of the handling game that was developing at other schools such as Rugby impossible, and necessitating a different code of rules. Forest School was also influential in formulating the new rules, being present at the fifth meeting of the F.A. on 1 December 1863, and having several members at the influential Forest Club.Adrian Harvey: Football: The First Hundred Years, 2005 During the formulation of the rules of association football in the 1860s representatives of Charterhouse and Westminster pushed for a passing game, in particular rules that allowed forward passing ("passing on"). Other schools (in particular Eton College, Shrewsbury School and Harrow) favoured a dribbling game with a tight off-side rule. It is claimed that Stoke Ramblers were formed in 1863 when former pupils of Charterhouse School formed a football club while apprentices at the North Staffordshire Railway works in Stoke-on-Trent. By 1867 the Football Association had chosen in favour of the Charterhouse and Westminster game and adopted a "loose" off-side rule that permitted forward passing.Morris Marples, A History of Football, Secker and Warburg, London 1954, page 150

On the evening of 26 October 1863, representatives of several football clubs in the Greater London area met at the Freemasons' Tavern on Long Acre in Covent Garden. This was the first meeting of The Football Association (FA). It was the world's first official football body and for this reason is not preceded with the word English. The first meeting resulted in the issuing of a request for representatives of the public schools to join the association. With the exception of Thring at Uppingham, most schools declined. In total, six meetings of the FA were held between October and December 1863. Committee member J. F. Alcock, said: "The Cambridge Rules appear to be the most desirable for the Association to adopt."

Banned practices

After the third meeting, a draft set of rules were published by the FA. However, at the beginning of the fourth meeting, attention was drawn to the recently published Cambridge Rules of 1863. The Cambridge rules differed from the draft FA rules in two significant areas; namely with regard to running with (carrying) the ball and hacking (kicking opposing players in the shins). The two contentious FA rules were as follows:

At the fifth meeting a motion was proposed that these two rules be removed from the FA rules. Most of the delegates supported this suggestion but F. W. Campbell, the representative from Blackheath and the first FA treasurer objected strongly. He said, "hacking is the true football". The motion was carried nonetheless and – at the final meeting – Campbell withdrew his club from the FA. After the final meeting on 8 December the FA published the "Laws of Football", the first comprehensive set of rules for the game later known as association football. The game also came to be called "soccer" as a shortening of "Association" around the same time as Rugby football, colloquially referred to as "rugger", was developing as the main ball carrying version of English football, and "soccer" remains a common descriptor in countries with other prominent football codes today.

These first FA laws contained elements that are no longer part of association football, but which are still recognisable in other games (e.g. Rugby Union and Australian rules football): for instance, if a player first touched the ball behind the opponents' goal line, his side was entitled to a "free kick" at goal, from that point and fifteen yards [approximately 14 metres] in front of the goal line; and a player could make a catch and claim a "mark", which entitled him to a free kick from or behind that point (see Laws 7 and 8 respectively). The laws of the game agreed on by the FA members stipulated a maximum length and breadth for the pitch, the procedure for kicking off, and the definition of terms, including goal, throw in, and offside. Passing the ball by hand was still permitted provided the ball was caught "fairly or on the first bounce". Despite the specifications of footwear having no "tough nails, iron plates and gutta percha" there were no specific rules on the number of players, penalties, foul play or the shape of the ball; captains of the participating teams were expected to agree on these things prior to the match.

Foundations of a competition The laws laid down by the FA had an immediate effect, with Sheffield F.C. and Nottingham (now Notts County) playing an annual fixture on the FA code, among others. As more teams joined the code in the 1860s, the sport veered away from its origins in public schools and came to be played with round balls and by teams that had settled on 11 players each. The rule eliminating passing of the ball forwards by making all players in front of the ball "offside" (much like in rugby today) was dropped. A Sheffield against London game in 1866 had allowed the FA to observe how the rules were affecting the game; subsequently handling of the ball was abolished except for one player on each team, the goalkeeper. A red tape was added between the two goalposts to indicate the top of the goal, and a national competition was proposed. 1867 saw the introduction of the first competition and oldest existing trophy in football, the Youdan Cup.

First FA Cup

On 20 July 1871, C. W. Alcock, a gentleman from Sunderland and a former pupil of Harrow School proposed that "a Challenge Cup should be established in connection with the [Football] Association", the idea that gave birth to the competition. At the first FA Cup in 1872, Wanderers and Royal Engineers met in the final in front of 2,000 paying spectators. Despite the Royal Engineers being the heavy favourites, one of their players sustained a broken collar bone early on and since substitutions had not yet been introduced, the Engineers played a man down for the rest of the match which they eventually lost 1–0.

The success of the inaugural FA Cup lead many English clubs to apply to take part. Inclusion required playing by the newly instituted FA code, which led to the quick spread of a universal set of rules. These rules are the basis of which all association football rules today stem.