Digital Lowpass butterworth filter with cut off 500Hz and sampling rate 1.25MSPS
Solution: Take a lower order butterworth filter or sampling frequency

Reason: As discussed here, a high order butterworth filter with a low (relative) cutoff frequency may be numerically unstable due to quantisation noise.

Explanation with figures:

I changed your frequency plot to include the region of interest:

freqz(b,a, logspace(1, 5, 1000), Fs)
ax = findall(gcf, 'Type', 'axes');
set(ax, 'XScale', 'log');


The frequency response is: 


which seems very noisy at low frequencies, indicating an unstable filter.

This results in an extremely high output (blue = input, red = output):


If I change the butterworth order to 4, I get:



The output (red) is a shifted version of the input (blue) as can been expected from the frequency response.

Keeping a 6th order butterworth filter, but lowering the sampling frequency also solves your problem.