Borderline Personality Disorder (BPD) is a serious mental disorder characterized by marked interpersonal disturbances, including difficulties trusting others and volatile impressions of others’ moral character, often resulting in premature relationship termination. The ability to build and maintain healthy relationships depends on our ability to use social information to build accurate representations of others and their mental states through social learning. One aspect of social learning that is especially relevant to forming and maintaining relationships is inferring others’ moral character, i.e., whether they are helpful and trustworthy, or harmful and untrustworthy. We introduce a novel computational assay of moral inference to investigate how patients with BPD form beliefs about the moral character of others and incorporate new information into existing beliefs. We find that the computational mechanisms of moral inference differed for untreated BPD patients relative to matched non-BPD control participants and BPD patients treated in a Democratic Therapeutic Community (DTC). In untreated BPD patients, beliefs about harmful agents were more certain and less amenable to updating relative to both non-BPD control participants and DTC-treated participants.The findings suggest that DTC may help the maintenance of social relationships in BPD by increasing patients’ openness to learning about adverse interaction partners. The results provide mechanistic insights into social deficits in BPD and demonstrate the potential for combining objective behavioral paradigms with computational modelling as a tool for assessing BPD pathology and treatment outcomes.