You have the two voltages fighting each other.
Look at the 5 V supply: it's connected directly to the output.
Meanwhile the voltage at R1 and R2 is trying to pull it away from 5 V but can't because the lower resistance of the directly connected 5 V circuit will always win.
V2 seems to be drawn as a positive supply. Your question says it's a negative signal.

simulate this circuit – Schematic created using CircuitLab
Figure 1. Inverting amplifier.
The inverting amplifier op-amp circuit does exactly what you need. In this configuration the relationship between output and input is given by the formula
$$ V_{OUT} = - \frac {R_F}{R_I} $$
Setting these as shown in Figure 1 gives a gain of -8 and your -40 V signal will be "amplified" to +5 V.
You need to select an op-amp capable of "rail to rail" operation. i.e., the output can swing to negative and positive rails.