LG Washer Wont Drain

I have an LG washing machine that wont drain. If I lay the drain hose down the water comes out just fine so I know it is not clogged. When I put the washer on spin the pump tuns on for 1 second and spits out a little water then wont turn on again. I took the pump off and plugged it into the wall and it ran just fine. When I put it back in the washer it will run for 1 second and then wont run anymore