Use Arduino to Run 24v Motor with Microswitch

Neither of those pictures help with answering your question about the 4V readings. FOr that you will need to draw and post a wiring drawing.

What is the microswitch connected to?

Too many people try to jump to programming without thinking through the process if done by hand (ie., without programming). This may be a bit hard to explain but will result in a well working circuit. You can test this before hand as well. The goal is to run the power for the motor through the DPST microswitch in such a way that the motor stops itself.

Without the Arduino:
24V Power to Microswitch COM
Microswitch NC (normally closed) contact to motor power.
Motor ground to 24V ground.
and
Connect 24V power to a push button switch, then from the switch to the motor power.

When the motor is home, the microswitch is open stopping the motor from getting power. Pressing the push button switch bypasses the microswitch and causes the motor to run. As soon as the microswitch closes, release the pushbutton and the motor will continue until it rotates to the home position and cause the microswitch to open again.

Swap the push button with a relay and connect to your Arduino. Close the relay long enough to get the micro switch to close and then open the relay. If you need to know the position of the microswitch, connect the microswitch NO contact use a zener diode-resistor-optocoupler combination to reduce from 24V signal to 5V for the Arduino to read on a digital input pin.