Chile and Mexico both share a common history in that they were both hosts to advanced indigenous societies and were both colonized by Spain. Diplomatic relations were established in the 1820s soon after both nations obtained independence from Spain. In 1825 Chile opened a consulate in Mexico City and in Mazatlán in 1875. On 7 March 1831, both nations signed a Treaty of Friendship, Trade and Navigation. In 1844, Mexico opened a consulate in Valparaíso. In 1864, during the Second French intervention in Mexico, Chile recognized and maintained diplomatic relations with the government of President Benito Juárez. In the early 1900s, both nations established resident embassies in each other's capitals respectively. In 1914, Chile belonged to regional group called the ABC nations. These three nations made up the richest and most influential nations in South America at the time. That year, the ABC nations intervened in a diplomatic dispute between the United States and Mexico who were on verge of war over the Tampico Affair and the subsequent occupation of Veracruz by US forces. The ABC nations meet with representatives of the United States and Mexico in Niagara Falls, Canada to ease the tension between the two nations and to avoid war, which afterwards did not occur. In 1960, President Adolfo López Mateos became the first Mexican head-of-state to pay a visit to Chile. In 1972, President Salvador Allende paid a visit to Mexico. On 11 November 1974, Mexican PresidentLuis Echeverría Álvarez severed diplomatic relations with Chile a year after the unconstitutional removal and death of elected President Salvador Allende by General Augusto Pinochet. For the next fifteen years, Mexico would receive thousands of Chilean refugees who fled the dictatorship of Pinochet. Both nations re-established diplomatic relations on 23 March 1990. Since the re-establishment of diplomatic relations, both nations have increasingly become closer with regards to bilateral relations and trade. Chile and Mexico are the only two Latin American countries who are members of the OECD and both nations are two of the four founding members of the Pacific Alliance. In March 2018, Mexican President Enrique Peña Nieto traveled to Chile to attend the inauguration of President Sebastián Piñera.
Both nations have signed numerous bilateral agreement such as an Agreement of Protection and Restitution of Cultural Property; Agreement of Cooperation to Combat Drug Trafficking and Drug dependency; Agreement on Technical and Scientific Cooperation; Agreement for Cultural and Educational Cooperation; Extradition Treaty; Agreement for Mutual Legal Assistance in Criminal Matters; Agreement for Touristic Cooperation; Agreement on Air Transportation; Agreement to Avoid Double Taxation and Prevent Tax Evasion on Income and Equity; Agreement for Strategic Association; Free Trade Agreement and an Agreement of Cooperation, Mutual Administrative Assistance and Exchange of Information in Customs Matters. , painted by Mexican artist Jorge González Camarena painted at the in the lobby of the Casa del Arte'' of the University of Concepción in Chile.
Both nations signed a free trade agreement in April 1998. In 2018, trade between Chile and Mexico totaled US$3.4 billion. Chile's main exports to Mexico include: lumber, plywood, salmon, peaches, cheese, wine and copper. Mexico's main exports to Chile include: automobiles and parts, tractors, electronics, machinery and beer. Between 1999–2017, Chilean companies have invested over US$852 million in Mexico. Several Mexican multinational companies such as América Móvil, Grupo Alsea, Grupo Bimbo and Mabe operate in Chile. Both nations are also signatories to the Trans-Pacific Partnership.