<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>520</ContextCount>
  <ElementCount>471</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>163</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>11</UnitCount>
  <MyReports>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Cover</Role>
      <ShortName>Cover</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>0000003 - Statement - Consolidated Statements of Financial Position</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofFinancialPosition</Role>
      <ShortName>Consolidated Statements of Financial Position</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>0000004 - Statement - Consolidated Statements of Financial Position (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofFinancialPositionParenthetical</Role>
      <ShortName>Consolidated Statements of Financial Position (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>0000005 - Statement - Consolidated Statements of Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofIncome</Role>
      <ShortName>Consolidated Statements of Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>0000006 - Statement - Consolidated Statements of Comprehensive Income</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofComprehensiveIncome</Role>
      <ShortName>Consolidated Statements of Comprehensive Income</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>0000007 - Statement - Consolidated Statements of Changes in Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofChangesinEquity</Role>
      <ShortName>Consolidated Statements of Changes in Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>0000008 - Statement - Consolidated Statements of Changes in Equity (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofChangesinEquityParenthetical</Role>
      <ShortName>Consolidated Statements of Changes in Equity (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>0000009 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ConsolidatedStatementsofCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>0000010 - Disclosure - Nature of operations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Natureofoperations</Role>
      <ShortName>Nature of operations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>0000011 - Disclosure - Material accounting policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Materialaccountingpolicies</Role>
      <ShortName>Material accounting policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>0000012 - Disclosure - Trade and other receivables</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Tradeandotherreceivables</Role>
      <ShortName>Trade and other receivables</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>0000013 - Disclosure - Inventories</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Inventories</Role>
      <ShortName>Inventories</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>0000014 - Disclosure - Property, plant and equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Propertyplantandequipment</Role>
      <ShortName>Property, plant and equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>0000015 - Disclosure - Investment in associate</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Investmentinassociate</Role>
      <ShortName>Investment in associate</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>0000016 - Disclosure - Other assets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Otherassets</Role>
      <ShortName>Other assets</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>0000017 - Disclosure - Long-term debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Longtermdebt</Role>
      <ShortName>Long-term debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>0000018 - Disclosure - Lease obligations</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Leaseobligations</Role>
      <ShortName>Lease obligations</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>0000019 - Disclosure - Other long-term liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Otherlongtermliabilities</Role>
      <ShortName>Other long-term liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>0000020 - Disclosure - Expenses</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Expenses</Role>
      <ShortName>Expenses</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>0000021 - Disclosure - Finance costs</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Financecosts</Role>
      <ShortName>Finance costs</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>0000022 - Disclosure - Net income per common share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Netincomepercommonshare</Role>
      <ShortName>Net income per common share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>22</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>0000023 - Disclosure - Share-based compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Sharebasedcompensation</Role>
      <ShortName>Share-based compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>0000024 - Disclosure - Segmented information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Segmentedinformation</Role>
      <ShortName>Segmented information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>0000025 - Disclosure - Income and other taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Incomeandothertaxes</Role>
      <ShortName>Income and other taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>0000026 - Disclosure - Supplemental cash flow information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Supplementalcashflowinformation</Role>
      <ShortName>Supplemental cash flow information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>0000027 - Disclosure - Capital disclosures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Capitaldisclosures</Role>
      <ShortName>Capital disclosures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>0000028 - Disclosure - Financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Financialinstruments</Role>
      <ShortName>Financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>28</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>0000029 - Disclosure - Financial risk management</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Financialriskmanagement</Role>
      <ShortName>Financial risk management</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>0000030 - Disclosure - Retirement plans</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Retirementplans</Role>
      <ShortName>Retirement plans</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>0000031 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Commitmentsandcontingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>0000032 - Disclosure - Related parties</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Relatedparties</Role>
      <ShortName>Related parties</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>0000033 - Disclosure - Non-controlling interests</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Noncontrollinginterests</Role>
      <ShortName>Non-controlling interests</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>0000034 - Disclosure - Sale of interest in subsidiary</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Saleofinterestinsubsidiary</Role>
      <ShortName>Sale of interest in subsidiary</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>0000035 - Disclosure - Egypt gas redirection and sale proceeds</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/Egyptgasredirectionandsaleproceeds</Role>
      <ShortName>Egypt gas redirection and sale proceeds</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9954471 - Disclosure - Material accounting policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/MaterialaccountingpoliciesPolicies</Role>
      <ShortName>Material accounting policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9954472 - Disclosure - Trade and other receivables (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/TradeandotherreceivablesTables</Role>
      <ShortName>Trade and other receivables (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Tradeandotherreceivables</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9954473 - Disclosure - Property, plant and equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/PropertyplantandequipmentTables</Role>
      <ShortName>Property, plant and equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Propertyplantandequipment</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9954474 - Disclosure - Investment in associate (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InvestmentinassociateTables</Role>
      <ShortName>Investment in associate (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Investmentinassociate</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9954475 - Disclosure - Other assets (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherassetsTables</Role>
      <ShortName>Other assets (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Otherassets</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9954476 - Disclosure - Long-term debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LongtermdebtTables</Role>
      <ShortName>Long-term debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Longtermdebt</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9954477 - Disclosure - Lease obligations (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LeaseobligationsTables</Role>
      <ShortName>Lease obligations (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Leaseobligations</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9954478 - Disclosure - Other long-term liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherlongtermliabilitiesTables</Role>
      <ShortName>Other long-term liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Otherlongtermliabilities</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9954479 - Disclosure - Expenses (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ExpensesTables</Role>
      <ShortName>Expenses (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Expenses</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9954480 - Disclosure - Finance costs (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancecostsTables</Role>
      <ShortName>Finance costs (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Financecosts</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9954481 - Disclosure - Net income per common share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NetincomepercommonshareTables</Role>
      <ShortName>Net income per common share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Netincomepercommonshare</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9954482 - Disclosure - Share-based compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationTables</Role>
      <ShortName>Share-based compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Sharebasedcompensation</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9954483 - Disclosure - Segmented information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SegmentedinformationTables</Role>
      <ShortName>Segmented information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Segmentedinformation</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9954484 - Disclosure - Income and other taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesTables</Role>
      <ShortName>Income and other taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Incomeandothertaxes</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9954485 - Disclosure - Supplemental cash flow information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SupplementalcashflowinformationTables</Role>
      <ShortName>Supplemental cash flow information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Supplementalcashflowinformation</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9954486 - Disclosure - Capital disclosures (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CapitaldisclosuresTables</Role>
      <ShortName>Capital disclosures (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Capitaldisclosures</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9954487 - Disclosure - Financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsTables</Role>
      <ShortName>Financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Financialinstruments</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9954488 - Disclosure - Financial risk management (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialriskmanagementTables</Role>
      <ShortName>Financial risk management (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Financialriskmanagement</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9954489 - Disclosure - Retirement plans (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansTables</Role>
      <ShortName>Retirement plans (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Retirementplans</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9954490 - Disclosure - Commitments and contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CommitmentsandcontingenciesTables</Role>
      <ShortName>Commitments and contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Commitmentsandcontingencies</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9954491 - Disclosure - Related parties (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RelatedpartiesTables</Role>
      <ShortName>Related parties (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Relatedparties</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9954492 - Disclosure - Non-controlling interests (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NoncontrollinginterestsTables</Role>
      <ShortName>Non-controlling interests (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://methanex.com/role/Noncontrollinginterests</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9954493 - Disclosure - Material accounting policies - Property plant and equipment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/MaterialaccountingpoliciesPropertyplantandequipmentDetails</Role>
      <ShortName>Material accounting policies - Property plant and equipment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>58</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9954494 - Disclosure - Material accounting policies - Leases (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/MaterialaccountingpoliciesLeasesDetails</Role>
      <ShortName>Material accounting policies - Leases (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>59</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9954495 - Disclosure - Material accounting policies - Share-based compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/MaterialaccountingpoliciesSharebasedcompensationDetails</Role>
      <ShortName>Material accounting policies - Share-based compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>60</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9954496 - Disclosure - Material accounting policies - Segmented information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/MaterialaccountingpoliciesSegmentedinformationDetails</Role>
      <ShortName>Material accounting policies - Segmented information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>61</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9954497 - Disclosure - Trade and other receivables (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/TradeandotherreceivablesDetails</Role>
      <ShortName>Trade and other receivables (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/TradeandotherreceivablesTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9954498 - Disclosure - Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InventoriesDetails</Role>
      <ShortName>Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/Inventories</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9954499 - Disclosure - Property, plant and equipment - Book value (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/PropertyplantandequipmentBookvalueDetails</Role>
      <ShortName>Property, plant and equipment - Book value (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>64</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9954500 - Disclosure - Property, plant and equipment - Owned assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/PropertyplantandequipmentOwnedassetsDetails</Role>
      <ShortName>Property, plant and equipment - Owned assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>65</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9954501 - Disclosure - Property, plant and equipment - Right of use assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/PropertyplantandequipmentRightofuseassetsDetails</Role>
      <ShortName>Property, plant and equipment - Right of use assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>66</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9954502 - Disclosure - Investment in associate - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InvestmentinassociateNarrativeDetails</Role>
      <ShortName>Investment in associate - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>67</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9954503 - Disclosure - Investment in associate - Statements of financial position (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InvestmentinassociateStatementsoffinancialpositionDetails</Role>
      <ShortName>Investment in associate - Statements of financial position (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>68</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9954504 - Disclosure - Investment in associate - Statements of income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InvestmentinassociateStatementsofincomeDetails</Role>
      <ShortName>Investment in associate - Statements of income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>69</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9954505 - Disclosure - Investment in associate - Key assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/InvestmentinassociateKeyassumptionsDetails</Role>
      <ShortName>Investment in associate - Key assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>70</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9954506 - Disclosure - Other assets - Components of other assets (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherassetsComponentsofotherassetsDetails</Role>
      <ShortName>Other assets - Components of other assets (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>71</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9954507 - Disclosure - Other assets - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherassetsNarrativeDetails</Role>
      <ShortName>Other assets - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>72</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9954508 - Disclosure - Long-term debt - Components of long-term debt (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LongtermdebtComponentsoflongtermdebtDetails</Role>
      <ShortName>Long-term debt - Components of long-term debt (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>73</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9954509 - Disclosure - Long-term debt - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LongtermdebtNarrativeDetails</Role>
      <ShortName>Long-term debt - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>74</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9954510 - Disclosure - Long-term debt - Maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LongtermdebtMaturityDetails</Role>
      <ShortName>Long-term debt - Maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>75</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9954511 - Disclosure - Lease obligations - Lease activity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LeaseobligationsLeaseactivityDetails</Role>
      <ShortName>Lease obligations - Lease activity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>76</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9954512 - Disclosure - Lease obligations - Lease payments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LeaseobligationsLeasepaymentsDetails</Role>
      <ShortName>Lease obligations - Lease payments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>77</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9954513 - Disclosure - Lease obligations - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LeaseobligationsNarrativeDetails</Role>
      <ShortName>Lease obligations - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>78</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9954514 - Disclosure - Lease obligations - Extension options (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/LeaseobligationsExtensionoptionsDetails</Role>
      <ShortName>Lease obligations - Extension options (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9954515 - Disclosure - Other long-term liabilities - Components of other long-term liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherlongtermliabilitiesComponentsofotherlongtermliabilitiesDetails</Role>
      <ShortName>Other long-term liabilities - Components of other long-term liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>80</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9954516 - Disclosure - Other long-term liabilities - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherlongtermliabilitiesNarrativeDetails</Role>
      <ShortName>Other long-term liabilities - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>81</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9954517 - Disclosure - Other long-term liabilities - Provision for site restoration costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/OtherlongtermliabilitiesProvisionforsiterestorationcostsDetails</Role>
      <ShortName>Other long-term liabilities - Provision for site restoration costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>82</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9954518 - Disclosure - Expenses - Components of expenses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ExpensesComponentsofexpensesDetails</Role>
      <ShortName>Expenses - Components of expenses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>83</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9954519 - Disclosure - Expenses - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/ExpensesNarrativeDetails</Role>
      <ShortName>Expenses - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>84</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9954520 - Disclosure - Finance costs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancecostsDetails</Role>
      <ShortName>Finance costs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/FinancecostsTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9954521 - Disclosure - Net income per common share - Reconciliation of numerator used for calculation of diluted net income per common share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NetincomepercommonshareReconciliationofnumeratorusedforcalculationofdilutednetincomepercommonshareDetails</Role>
      <ShortName>Net income per common share - Reconciliation of numerator used for calculation of diluted net income per common share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>86</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9954522 - Disclosure - Net income per common share - Reconciliation of denominator used for calculation of diluted net income per common share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NetincomepercommonshareReconciliationofdenominatorusedforcalculationofdilutednetincomepercommonshareDetails</Role>
      <ShortName>Net income per common share - Reconciliation of denominator used for calculation of diluted net income per common share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>87</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9954523 - Disclosure - Net income per common share - Basic and diluted (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NetincomepercommonshareBasicanddilutedDetails</Role>
      <ShortName>Net income per common share - Basic and diluted (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>88</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9954524 - Disclosure - Share-based compensation - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationNarrativeDetails</Role>
      <ShortName>Share-based compensation - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>89</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9954525 - Disclosure - Share-based compensation - Changes in SARs and TSARs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationChangesinSARsandTSARsDetails</Role>
      <ShortName>Share-based compensation - Changes in SARs and TSARs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9954526 - Disclosure - Share-based compensation - Range of exercise prices in SARs and TSARs (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationRangeofexercisepricesinSARsandTSARsDetails</Role>
      <ShortName>Share-based compensation - Range of exercise prices in SARs and TSARs (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9954527 - Disclosure - Share-based compensation - Weighted average assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationWeightedaverageassumptionsDetails</Role>
      <ShortName>Share-based compensation - Weighted average assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9954528 - Disclosure - Share-based compensation - Changes in other equity instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SharebasedcompensationChangesinotherequityinstrumentsDetails</Role>
      <ShortName>Share-based compensation - Changes in other equity instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R94.htm</HtmlFileName>
      <LongName>9954529 - Disclosure - Segmented information - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SegmentedinformationNarrativeDetails</Role>
      <ShortName>Segmented information - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>94</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R95.htm</HtmlFileName>
      <LongName>9954530 - Disclosure - Segmented information - Revenue attributed to geographic location (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SegmentedinformationRevenueattributedtogeographiclocationDetails</Role>
      <ShortName>Segmented information - Revenue attributed to geographic location (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>95</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R96.htm</HtmlFileName>
      <LongName>9954531 - Disclosure - Segmented information - Property, plant and equipment, net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SegmentedinformationPropertyplantandequipmentnetDetails</Role>
      <ShortName>Segmented information - Property, plant and equipment, net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>96</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R97.htm</HtmlFileName>
      <LongName>9954532 - Disclosure - Income and other taxes - Income tax (expense) recovery (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesIncometaxexpenserecoveryDetails</Role>
      <ShortName>Income and other taxes - Income tax (expense) recovery (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>97</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R98.htm</HtmlFileName>
      <LongName>9954533 - Disclosure - Income and other taxes - Reconciliation of effective tax (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesReconciliationofeffectivetaxDetails</Role>
      <ShortName>Income and other taxes - Reconciliation of effective tax (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>98</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R99.htm</HtmlFileName>
      <LongName>9954534 - Disclosure - Income and other taxes - Net deferred income tax assets and liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesNetdeferredincometaxassetsandliabilitiesDetails</Role>
      <ShortName>Income and other taxes - Net deferred income tax assets and liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>99</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R100.htm</HtmlFileName>
      <LongName>9954535 - Disclosure - Income and other taxes - Unused tax losses (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesUnusedtaxlossesDetails</Role>
      <ShortName>Income and other taxes - Unused tax losses (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>100</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R101.htm</HtmlFileName>
      <LongName>9954536 - Disclosure - Income and other taxes - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesNarrativeDetails</Role>
      <ShortName>Income and other taxes - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>101</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R102.htm</HtmlFileName>
      <LongName>9954537 - Disclosure - Income and other taxes - Change in deferred income tax liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/IncomeandothertaxesChangeindeferredincometaxliabilitiesDetails</Role>
      <ShortName>Income and other taxes - Change in deferred income tax liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>102</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R103.htm</HtmlFileName>
      <LongName>9954538 - Disclosure - Supplemental cash flow information - Changes in non-cash working capital (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SupplementalcashflowinformationChangesinnoncashworkingcapitalDetails</Role>
      <ShortName>Supplemental cash flow information - Changes in non-cash working capital (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>103</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R104.htm</HtmlFileName>
      <LongName>9954539 - Disclosure - Supplemental cash flow information - Reconciliation of liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SupplementalcashflowinformationReconciliationofliabilitiesDetails</Role>
      <ShortName>Supplemental cash flow information - Reconciliation of liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>104</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R105.htm</HtmlFileName>
      <LongName>9954540 - Disclosure - Capital disclosures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CapitaldisclosuresDetails</Role>
      <ShortName>Capital disclosures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/CapitaldisclosuresTables</ParentRole>
      <Position>105</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R106.htm</HtmlFileName>
      <LongName>9954541 - Disclosure - Financial instruments - Financial assets and liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFinancialassetsandliabilitiesDetails</Role>
      <ShortName>Financial instruments - Financial assets and liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>106</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R107.htm</HtmlFileName>
      <LongName>9954542 - Disclosure - Financial instruments - North american natural gas forward contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsNorthamericannaturalgasforwardcontractsDetails</Role>
      <ShortName>Financial instruments - North american natural gas forward contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>107</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R108.htm</HtmlFileName>
      <LongName>9954543 - Disclosure - Financial instruments - Euro forward exchange contracts (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsEuroforwardexchangecontractsDetails</Role>
      <ShortName>Financial instruments - Euro forward exchange contracts (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>108</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R109.htm</HtmlFileName>
      <LongName>9954544 - Disclosure - Financial instruments - Changes in cash flow hedges and excluded forward element (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsChangesincashflowhedgesandexcludedforwardelementDetails</Role>
      <ShortName>Financial instruments - Changes in cash flow hedges and excluded forward element (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>109</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R110.htm</HtmlFileName>
      <LongName>9954545 - Disclosure - Financial instruments - Fair value - Level 2 instruments, maturity (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFairvalueLevel2instrumentsmaturityDetails</Role>
      <ShortName>Financial instruments - Fair value - Level 2 instruments, maturity (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>110</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R111.htm</HtmlFileName>
      <LongName>9954546 - Disclosure - Financial instruments - Fair value - Level 2 instruments, narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFairvalueLevel2instrumentsnarrativeDetails</Role>
      <ShortName>Financial instruments - Fair value - Level 2 instruments, narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>111</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R112.htm</HtmlFileName>
      <LongName>9954547 - Disclosure - Financial instruments - Fair value - Level 2 instruments, carrying values of financial instruments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFairvalueLevel2instrumentscarryingvaluesoffinancialinstrumentsDetails</Role>
      <ShortName>Financial instruments - Fair value - Level 2 instruments, carrying values of financial instruments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>112</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R113.htm</HtmlFileName>
      <LongName>9954548 - Disclosure - Financial instruments - Fair value - Level 3 instrument, narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFairvalueLevel3instrumentnarrativeDetails</Role>
      <ShortName>Financial instruments - Fair value - Level 3 instrument, narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>113</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R114.htm</HtmlFileName>
      <LongName>9954549 - Disclosure - Financial instruments - Fair value - Level 3 instrument, inputs and the sensitivities, valuation to changes (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialinstrumentsFairvalueLevel3instrumentinputsandthesensitivitiesvaluationtochangesDetails</Role>
      <ShortName>Financial instruments - Fair value - Level 3 instrument, inputs and the sensitivities, valuation to changes (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>114</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R115.htm</HtmlFileName>
      <LongName>9954550 - Disclosure - Financial risk management - Interest rate risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialriskmanagementInterestrateriskDetails</Role>
      <ShortName>Financial risk management - Interest rate risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>115</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R116.htm</HtmlFileName>
      <LongName>9954551 - Disclosure - Financial risk management - Foreign currency risk (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialriskmanagementForeigncurrencyriskDetails</Role>
      <ShortName>Financial risk management - Foreign currency risk (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>116</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R117.htm</HtmlFileName>
      <LongName>9954552 - Disclosure - Financial risk management - Liquidity risks (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/FinancialriskmanagementLiquidityrisksDetails</Role>
      <ShortName>Financial risk management - Liquidity risks (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>117</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R118.htm</HtmlFileName>
      <LongName>9954553 - Disclosure - Retirement plans - Defined benefit pension plans (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansDefinedbenefitpensionplansDetails</Role>
      <ShortName>Retirement plans - Defined benefit pension plans (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>118</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R119.htm</HtmlFileName>
      <LongName>9954554 - Disclosure - Retirement plans - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansNarrativeDetails</Role>
      <ShortName>Retirement plans - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>119</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R120.htm</HtmlFileName>
      <LongName>9954555 - Disclosure - Retirement plans - Expense recognized in income statement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansExpenserecognizedinincomestatementDetails</Role>
      <ShortName>Retirement plans - Expense recognized in income statement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>120</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R121.htm</HtmlFileName>
      <LongName>9954556 - Disclosure - Retirement plans - Expense recognized in other comprehensive income (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansExpenserecognizedinothercomprehensiveincomeDetails</Role>
      <ShortName>Retirement plans - Expense recognized in other comprehensive income (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>121</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R122.htm</HtmlFileName>
      <LongName>9954557 - Disclosure - Retirement plans - Asset allocation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RetirementplansAssetallocationDetails</Role>
      <ShortName>Retirement plans - Asset allocation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>122</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R123.htm</HtmlFileName>
      <LongName>9954558 - Disclosure - Commitments and contingencies - Minimum purchase contract commitment (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CommitmentsandcontingenciesMinimumpurchasecontractcommitmentDetails</Role>
      <ShortName>Commitments and contingencies - Minimum purchase contract commitment (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>123</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R124.htm</HtmlFileName>
      <LongName>9954559 - Disclosure - Commitments and contingencies - Other commitments (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CommitmentsandcontingenciesOthercommitmentsDetails</Role>
      <ShortName>Commitments and contingencies - Other commitments (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>124</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R125.htm</HtmlFileName>
      <LongName>9954560 - Disclosure - Commitments and contingencies - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/CommitmentsandcontingenciesNarrativeDetails</Role>
      <ShortName>Commitments and contingencies - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>125</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R126.htm</HtmlFileName>
      <LongName>9954561 - Disclosure - Related parties - Subsidiaries and joint ventures (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RelatedpartiesSubsidiariesandjointventuresDetails</Role>
      <ShortName>Related parties - Subsidiaries and joint ventures (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>126</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R127.htm</HtmlFileName>
      <LongName>9954562 - Disclosure - Related parties - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RelatedpartiesNarrativeDetails</Role>
      <ShortName>Related parties - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>127</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R128.htm</HtmlFileName>
      <LongName>9954563 - Disclosure - Related parties - Remuneration (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/RelatedpartiesRemunerationDetails</Role>
      <ShortName>Related parties - Remuneration (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>128</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R129.htm</HtmlFileName>
      <LongName>9954564 - Disclosure - Non-controlling interests - Financial position (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NoncontrollinginterestsFinancialpositionDetails</Role>
      <ShortName>Non-controlling interests - Financial position (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>129</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R130.htm</HtmlFileName>
      <LongName>9954565 - Disclosure - Non-controlling interests - Income statement (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NoncontrollinginterestsIncomestatementDetails</Role>
      <ShortName>Non-controlling interests - Income statement (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>130</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R131.htm</HtmlFileName>
      <LongName>9954566 - Disclosure - Non-controlling interests - Cash flows (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/NoncontrollinginterestsCashflowsDetails</Role>
      <ShortName>Non-controlling interests - Cash flows (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>131</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R132.htm</HtmlFileName>
      <LongName>9954567 - Disclosure - Sale of interest in subsidiary (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/SaleofinterestinsubsidiaryDetails</Role>
      <ShortName>Sale of interest in subsidiary (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/Saleofinterestinsubsidiary</ParentRole>
      <Position>132</Position>
    </Report>
    <Report instance="mx-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R133.htm</HtmlFileName>
      <LongName>9954568 - Disclosure - Egypt gas redirection and sale proceeds (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://methanex.com/role/EgyptgasredirectionandsaleproceedsDetails</Role>
      <ShortName>Egypt gas redirection and sale proceeds (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://methanex.com/role/Egyptgasredirectionandsaleproceeds</ParentRole>
      <Position>133</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="40-F" isDefinitelyFs="true" isIfrs="true" original="mx-20231231.htm">mx-20231231.htm</File>
    <File doctype="40-F" isDefinitelyFs="true" isIfrs="true" original="mx-20231231_d2.htm">mx-20231231_d2.htm</File>
    <File>mx-20231231.xsd</File>
    <File>mx-20231231_cal.xml</File>
    <File>mx-20231231_def.xml</File>
    <File>mx-20231231_lab.xml</File>
    <File>mx-20231231_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>mx-20231231_g1.jpg</File>
    <File>mx-20231231_g2.jpg</File>
    <File>mx-20231231_g3.jpg</File>
    <File>mx-20231231_g4.gif</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1">http://fasb.org/srt/2023</BaseTaxonomy>
    <BaseTaxonomy items="43">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="1284">https://xbrl.ifrs.org/taxonomy/2023-03-23/ifrs-full</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
