ConocoPhillips has agreed to acquire Marathon Oil Corp. in an all-stock transaction with an enterprise value of $22.5 billion, inclusive of $5.4 billion of net debt.