I have a pendant light (single bulb) that used to be hard-wired in my previous house. I would like to install it in a closet as a plug in light (with an in-line switch). The fixture has a ground wire running up the chain and the plug wire has only the two wires. What do I do with the ground wire from the light? Can I just remove it and attach the cord?
The best solution is to use a plug and cord with ground and only plug it into a grounded socket.
Or you can use a GFCI protected plug, that will disconnect the power if a ground fault is detected.
Failing to do either of them is dangerous.
Yes, you can remove it and do without. However, I wouldn't completely cut off the ground so that you could still use it in the future if ever able.
Also, do know that you are bypassing the safety on this light. If a wire ever shorts out onto the light and someone touches it, they will get a zap.
Just remove it, you'll be fine.