Rotating bone along X axis with Y restraint bends boned

I am animating an arm, and restricted it along the Y axis (Forward and Backwards) so it wouldn’t go backwards. But then, when I rotated it along the X axis (sideways), it twisted backwards and around. I don’t NEED the restraints, but it would be nice to know why this happened and how to stop it.

I assume you are talking about Global axis and character is facing-Y direction. Then, rotating the arm in Global X axis means swinging the arm around along the side of body. Is this right?

“Twist backwards”, you really need to show us your rig to give you any suggestions.

A lot depends on the pivot point you have selected. Usually it’s best to leave it at object origins when using bones. It sounds as if you have it set to cursor or median. This is just a wild guess not worth the time it takes to read it but since there’s no file it’s all I got.