Step 1: Find the function and the derivatives.
We are given \( f(x) = x^3 + ax^2 + b \log|x| + 1 \). To find the critical points, we compute the first derivative \( f'(x) \):
\[
f'(x) = 3x^2 + 2ax + \frac{b}{x}.
\]
We are given that the critical points occur at \( x = -1 \) and \( x = 2 \). So, we solve:
\[
f'(-1) = 0 \quad \text{and} \quad f'(2) = 0.
\]
Step 2: Solve for \( a \) and \( b \).
Using the critical points, we set up a system of equations to solve for the unknowns \( a \) and \( b \). After solving, we get:
\[
a = \frac{-9}{2}, \quad b = 12.
\]
Step 3: Evaluate the function at the endpoints and critical points.
Now, we substitute \( a = \frac{-9}{2} \) and \( b = 12 \) into the function:
\[
f(x) = x^3 + \frac{-9}{2}x^2 + 12 \log|x| + 1.
\]
We evaluate \( f(x) \) at \( x = -2 \), \( x = -\frac{1}{2} \), and the critical points \( x = -1 \) and \( x = 2 \).
After substituting and calculating these values, we get:
\[
f(-2) = -8 - 18 + 12\log2 + 1 = -25 + 12\log2 \approx -16.6,
\]
\[
f\left(-\frac{1}{2}\right) = -\frac{1}{8} - \frac{9}{8} + 12\log\left(\frac{1}{2}\right) + 1 = -\frac{10}{8} - 12\log2 + 1 \approx -4.5,
\]
\[
f(-1) = -1 - \frac{9}{2} + 1 = -\frac{9}{2},
\]
\[
f(2) = 8 - 18 + 12\log2 + 1 \approx 22.1.
\]
Step 4: Find the minimum and maximum values.
The absolute minimum value \( m \) is approximately \( -16.6 \), and the maximum value \( M \) is approximately \( 22.1 \).
Step 5: Calculate \( |M + m| \).
Finally, we calculate:
\[
|M + m| = |22.1 + (-16.6)| = 21.1.
\]
Thus, the correct answer is:
\[
21.1
\]