To find the slope of the line that goes through the points \((1, -5)\) and \((4, 1)\), we can use the slope formula:
\[ m = \frac{y_2 - y_1}{x_2 - x_1} \]
Here, \((x_1, y_1) = (1, -5)\) and \((x_2, y_2) = (4, 1)\).
Substituting the values into the formula:
\[ m = \frac{1 - (-5)}{4 - 1} = \frac{1 + 5}{4 - 1} = \frac{6}{3} = 2 \]
Thus, the slope of the line is:
\[ \boxed{2} \]
So the correct answer is D. 2.