Although the city was founded in the 16th century, there is evidence of habitation in the area by the Chango people as early as 7,000 BC. During colonial times, Iquique was part of the Viceroyalty of Peru as much of South America was at the time, and remained part of Peruvian territory until the end of the 19th century. Iquique's early development was due in large part to the discovery of mineral riches, particularly the presence of large deposits of sodium nitrate in the Atacama Desert (then part of Peruvian territory).
In July 1835, Charles Darwin, during his voyage on the Beagle, traveled to Iquique and described it as a town "very much in want of everyday necessities, such as water and firewood". These necessities had to be brought in from considerable distances. Darwin also visited the saltpeter works.
The city has been devastated by several earthquakes, including the 1868 Arica earthquake, the 1877 Iquique earthquake, and the 2005 Tarapacá earthquake. The 2014 Iquique earthquake occurred with a moment magnitude of 8.2 on April 1, 2014.
Territorial disputes between Bolivia and Chile triggered the War of the Pacific in 1879. The Battle of Iquique was fought in the harbor of Iquique on May 21, 1879, now commemorated as Navy Day, an annual public holiday in Chile. The outcome of the war gave Chile this portion of the Peruvian territory.
Over the years there was substantial emigration from other parts of Chile to this area which was called the Norte Grande. In subsequent years the further exportation of Chilean saltpeter (mainly to European countries) significantly helped in the development of the city, attracting foreigners and rapidly expanding housing projects.
In December 1907, the city was marred by the Santa María de Iquique Massacre when the Chilean Army, under the command of Gen. Roberto Silva Renard, opened fire on thousands of saltpeter miners, and their wives and children, who assembled inside the Santa María School. The workers had marched into town to protest their working conditions and wages. Somewhere between 500 and 2,000 people were killed. The folk group Quilapayún recorded an album in remembrance of the event (Cantata Santa María de Iquique) in 1970. In December 2007 a series of cultural and ceremonial activities were planned, culminating in the week between December 14 to 21, to commemorate the centenary year of the massacre.
Mars 96 launched by Russia in 1996, but failed to leave Earth orbit, and re-entered the atmosphere a few hours later. The two RTGs onboard carried in total 200 g of plutonium and are assumed to have survived reentry as they were designed to do. They are thought to now lie somewhere in a northeast-southwest running oval 320 km (199 mi) long by 80 km (50 mi) wide which is centred 32 km (20 mi) east of Iquique, Chile.
Prior to becoming Chilean territory, Iquique was home to some of the greatest Peruvian heroes, namely Alfonso Ugarte (who was elected Mayor in 1876), Ramon Zavala, a rich saltpeter entrepreneur; Guillermo Billinghurst, later President of Peru (who after being overthrown in 1914 came to Iquique – then already under Chilean rule – to live out his last years), and Ramon Castilla, three times president of Peru, who was born in San Lorenzo de Tarapacá and died in the Desert of Tiviliche, Tarapacá, who lived in Iquique during his mandate as Governor of Tarapacá in 1825.
As a commune, Iquique is a third-level administrative division of Chile administered by a municipal council, headed by an alcalde who is directly elected every four years. The 2012–2016 alcalde is Jorge Soria.
Within the electoral divisions of Chile, Iquique is represented in the Chamber of Deputies by Mrs. Marta Isasi (Ind.) and Mr. Hugo Gutiérrez (PC) as part of the 2nd electoral district, which includes the entire Tarapacá Region.The commune is represented in the Senate by Fulvio Rossi Ciocca (PS) and Jaime Orpis Bouchon (UDI) as part of the 1st senatorial constituency (Arica and Parinacota Region and Tarapacá Region).
Iquique has one of the largest duty-free commercial port centers of South America, the Zona Franca of Iquique (free zone of Iquique) which has been traditionally called Zofri. There are around 2.4 square kilometres (0.93 sq mi) of warehouses, banking branches, and restaurants.
Copper mining, mainly in Quebrada Blanca, Cerro Colorado, and Doña Inés de Collahuasí, is also an important industry in Iquique.
According to the 2002 census of National Statistics Institute (INE), the commune of Iquique had an area of 2,835.3 km2 (1,095 sq mi) and 216,419 inhabitants (108,897 men and 107,522 women). Of these, 214,586 (99.2%) lived in urban areas and 1,833 (0.9%) in rural areas. The township has an area of 2,262.4 km2 (874 sq mi) and a population of 166,204 inhabitants. The population grew by 42.7% (64,742 persons) between the 1992 and 2002 censuses. Iquique is home to 56% of the total population of the Tarapacá region. In 2008, the city had 226,204 habitants.
There is a significant percentage of ethnic group colony residents. The most numerous communities are Croatian, Italian, Greek, Chinese, Arabic nationalities, Peruvians and Bolivians, British peoples (i.e. Scots), and the French.
In the 1910s and 1920s, about a thousand East Indian (from India and Pakistani) saltpeter mine workers hired by British mine companies appeared in Iquique and today, their descendants mixed into the local population. Lately, a wave of North American and Australian immigrants came to retire and enjoy the city's beach climate. Immigrants currently correspond to 9.2% of the total population.
Iquique has a rare mild desert climate (Köppen BWn) with low extremes of temperatures all year round and almost no rainfall.
Iquique is home to football team Deportes Iquique. It hosted the 2016 FIRS Women's Roller Hockey World Cup.