Spurious Analog inputs when connected a DC fan

When I connect a DC motor of 12 V and 0.2A , and try to read Analog values through an UNO board, Analog pins
They show a stream of numbers close to 300, even when no device is connected same stream with a little deviation. The connection seems to be okay as the motor rotates when I send power to it through the board.

If you have nothing connected to an I/O pin its voltage "floats" in a completely unpredictable way. The small disturbances caused by the motor could easily give rise to strange values.