How to suppress voltage spikes caused by USB fan on ATX 5V rail?
That looks like a nice resonant ring as opposed to noise. Try putting a small LC filter on the fan supply, that should stop any noise from feeding back to the supply. Also on the ATmega, you could apply an LC or small RC filter to again reduce noise entering the system. The scope looks like it is ~500kHz, so something like a 10kHz low pass filter would work well. A sensitive device like an ATmega really should have a dedicated voltage regulator instead of running right off of an ATX supply. Consider bringing 12V into a 5V linear regulator for the ATmega, this will remove any unwanted noise.

Here is a filter equation. You can replace L with R.

$$ f_c = \dfrac{1}{2 \pi \sqrt{LC}} $$