It's a 2 in one capacitor used for rf suppression.
Probably in the range of 0.1uF per leg.
One leg each to the motor with the green to the frame.
Might pay to double check as it does not look like the earth wire on the main lead is connected to anything.