Abstract Social disconnection, including objective social isolation and subjective loneliness, is linked to substantial health risks. Yet, little is known about the predictors of social disconnection in individuals with mental illness. Here, we used machine learning to identify predictors of social isolation and loneliness in schizophrenia (N = 72), a psychiatric condition associated with social disconnection. For comparison, we also included two other groups: a psychiatric comparison sample of bipolar disorder (N = 48) and a community sample enriched for social isolation (N = 151). We fitted statistical models of social isolation and loneliness within and across groups. Each model included five candidate predictors: social avoidance motivation, depression, nonsocial cognition, social anhedonia, and social cognition. The results showed that social anhedonia explained unique variance in social isolation and loneliness in all samples, suggesting that it contributes to social isolation and loneliness broadly. However, nonsocial cognition explained unique variance in social isolation only within schizophrenia. Thus, social anhedonia could be a potential intervention target across populations, whereas nonsocial cognition may play a unique role in determining social disconnection in schizophrenia.