The increasing prevalence of AI chatbots in healthcare has revolutionized patient care by enhancing accessibility and efficiency while raising critical ethical and privacy concerns. Drawn from the O-S-O-R model, this study utilizes survey data to reveal the complex underlying mechanism from perceived health stigma (O1) to the preference for AI chatbots over doctors (R). Specifically, we theorized the mediating roles of self-disclosure to AI chatbots (S), emotional efficacy, AI privacy concern, and trust in AI chatbots (O2). Structural equation modeling results showed that perceived health stigma significantly motivated individuals to self-disclose to AI chatbots. Self-disclosure enhanced emotional self-efficacy and heightened AI privacy concerns, which respectively facilitated and undermined trust in AI chatbots; trust, in turn, positively influenced a preference for chatbots over doctors. This study extends the O-S-O-R model to human-computer interaction, elucidating how perceived health stigma influences preferences for AI chatbots over doctors.