Research on online doctor-patient interaction is vast but has rarely examined its internal factors from a psychological point of view. Drawing on interpersonal attraction theory, this study explores whether potential personality traits of doctors and patients strengthen or weaken the behavior of patient selection and the contingent roles of patient psychological stress and doctor’s title in online doctor-patient interaction. We leverage text mining in combination with econometrics techniques and studying the online doctor-patient interaction text data from a total of 245,027 consultations with 961 doctors in a large online health community in China, and we found that doctor-patient personality similarity plays a primary role in inducing patients selection behavior. Particularly, similarities in the openness, conscientiousness, and agreeableness dimensions of personality attract more patient selection, in contrast to similarities in the extroversion and neuroticism dimensions. In addition, patient psychological stress and the doctor’s title both strengthen the link between doctor-patient personality similarity and patient selection. Grounded in the perspective of social psychology, this study reveals the mechanism and influence of personality traits on doctors' online services provided to patients, and it implies that doctors and patients with high personality similarities could be productively matched to facilitate high-quality service delivery.