Hypothyroidism may affect obsessive-compulsive disorder (OCD) through altered neurotransmitter activity, inflammation, and immune system responses. The connection may also work the other way around.