The Calgary area was inhabited by pre-Clovis people whose presence has been traced back at least 11,000 years. The area has been inhabited by the multiple First Nations, the Niitsitapi (Blackfoot Confederacy; Siksika, Kainai, Piikani), îyârhe Nakoda, the Tsuutʼina peoples and Métis Nation, Region 3. As Mayor Naheed Nenshi (A'paistootsiipsii; Iitiya) describes, "There have always been people here. In Biblical times there were people here. For generations beyond number, people have come here to this land, drawn here by the water. They come here to hunt and fish; to trade; to live; to love; to have great victories; to taste bitter disappointment; but above all to engage in that very human act of building community."
In 1787, David Thompson, a 17 year old cartographer with the Hudson's Bay Company (HBC) spent the winter with a band of Peigan encamped along the Bow River. He was also a fur trader and surveyor and the first recorded European to visit the area. John Glenn was the first documented European settler in the Calgary area, in 1873. In Spring 1875, Fathers Lacombe, Remus, and Scollen built a small log cabin on the banks of the Elbow River.
In the fall of 1875, the site became a post of the North-West Mounted Police (NWMP) (now the Royal Canadian Mounted Police or RCMP). The NWMP detachment was assigned to protect the western plains from US whisky traders, and to protect the fur trade, and Inspector Éphrem-A. Brisebois led fifty Mounties as part of "F Troop" north from Fort Macleod to establish the site The I. G. Baker Company of Fort Benton, Montana was contracted to construct a suitable Fort, and after its completion, the Baker company built a log store next to the Fort. The NWMP Fort remained officially nameless until construction was complete, although it had been referred to as "The Mouth" by people at Fort Macleod. At Christmas dinner NWMP Inspector Éphrem-A. Brisebois christened the unnamed Fort "Fort Brisebois", a decision which caught the ire of his superiors Colonel James Macleod and Major Acheson Irvine. Major Irvine cancelled the order by Brisebois and wrote Hewitt Bernard, the then Deputy Minister of Justice in Ottawa, describing the situation and suggesting the name "Calgary" put forward by Colonel Macleod. Edward Blake, at the time Minister of Justice, agreed with the name and in the spring of1876 Fort Calgary was officially established.
In 1881 the federal government began to offer leases for cattle ranching in Alberta (up to 400 km2 (100,000 acres) for one cent per acre per year) under the Dominion Lands Act, which became a catalyst for immigration to the settlement. The I. G. Baker Company drove the first herd of cattle to the region in the same year for the Cochrane area by order of Major James Walker.
The Canadian Pacific Railway (CPR) reached the area in August 1883, and constructed a rail station on the CPR owned Section 15, neighbouring the townsite across the Elbow River to the east located on Section 14. The difficulty in crossing the river and the CPR's efforts to persuade residents resulted in the core of the Calgary townsite moving onto Section 15, with the fate of the old townsite sealed when the post office was anonymously moved across the icy Elbow River during the night. The CPR subdivided Section 15 and began selling lots surrounding the station, $450 for corner lots and $350 for all others; and pioneer Felix McHugh constructed the first private building on the site. Earlier in the decade it was not expected that the railroad would pass near Calgary, instead the preferred route put forward by people concerned with the young nation's defense was passing near Edmonton and through the Yellowhead Pass. However, in 1881 CPR changed the plans preferring the a direct route through the prairies by way of Kicking Horse Pass. Along with the CPR, August 1883 brought Calgary the first edition of the Calgary Herald published on the 31st under the title The Calgary Herald, Mining and Ranche Advocate and General Advertiser by teacher Andrew M. Armour and printer Thomas B. Braden, a weekly newspaper with a subscription price of $1 per year.
Over a century later, the Canadian Pacific Railway headquarters moved to Calgary from Montreal in 1996.
Residents of the now eight year old settlement sought to form a local government of their own. In the first weeks of 1884, James Reilly who was building the Royal Hotel east of the Elbow River circulated 200 handbills announcing a public meeting on January 7, 1884 at the Methodist Church. At the full meeting Reilly advocated for a bridge across the Elbow River and a civic committee to watch over the interests of the public until Calgary could be incorporated. The attendees were enthusiastic about the committee and on the next evening a vote was held to elected the seven members. A total of 24 candidates were nominated which equalled 10 per cent of Calgary's male population. Major James Walker received 88 votes, the most amongst the candidates, the other six members were Dr. Andrew Henderson, George Clift King, Thomas Swan, George Murdoch, J. D. Moulton, and Captain John Stewart. The civic committee met with Edgar Dewdney, who was then the Lieutenant Governor of the North-West Territories who happened to be in Calgary at the time, to discuss an allowance for a school, an increase from $300 to $1,000 grant for a bridge over the Elbow River, incorporation as a Town, and representation for Calgary in the Legislative Council of the North-West Territories. The committee was successful in getting an additional $200 for the bridge, and eventually a by-election was held on June 28, 1884 where James Davidson Geddes defeated James Kidd Oswald to become the Calgary electoral district representative to 1st Council of the North-West Territories. As for education, Calgary moved quickly, the Citizen's Committee raised $125 on February 6, 1884 and the first school opened for twelve children days later on February 18, led by teacher John William Costello. The private school was not enough for the needs of the town, and following a petition by James Walker the Calgary Protestant Public School District No. 19 was formed by the Legislature on March 2, 1885.
On November 27, 1884 the wait was finally over as Lieutenant Governor Dewdney proclaimed the incorporation of The Town of Calgary. Shortly after on December 3, Calgarians went to the polls to elect their first Mayor and four Councillors. The North-West Municipal Ordinance of 1884 provided voting rights to any male British subject over 21 years of age who owned at minimum $300 of property. The election was held under multiple non-transferable vote where each elector was able to cast a ballot for the mayor and up to four ballots for separate councillors. George Murdoch won the mayoral race in a landslide victory with 202 votes over E. Redpath's 16, while Simon Jackson Hogg, Neville James Lindsay, Joseph Henry Millward, and Simon John Clarke were elected Councillors. The next morning the Council met for the first time at Beaudoin and Clarke's Saloon.
Law and order remained top of mind in the frontier town, in early 1884 Jack Campbell was appointed as a constable for the community, and in early 1885 the Town Council passed By-law Eleven creating the position of Chief Constable and assigning relevant duties, a precursor to the Calgary Police Service. The first Chief Constable John (Jack) S. Ingram, who had previously served as the first police chief in Winnipeg, was empowered to arrest drunken and disorderly people, stop all fast riding in town, attend all fires and council meetings. Calgary Town Council was eager to employ constables versus contracting the NWMP for town duty as the police force was seen as a money-making proposition. Constables received half of the fines from liquor cases, meaning Chief Constable Ingram could easily pay his $60 per month salary and the expense of a town jail.