As artificial intelligence technologies evolve, a discernible trend is emerging wherein chatbots are imbued with the capability to articulate emotions within online customer service. However, the research on emotional expression by chatbots is still in its infancy, and the existing research on this aspect is inconclusive. Therefore, from the perspective of chatbots expressing humor, this study proposes a boundary condition for the effectiveness of chatbot-expressed humor and a different influence mechanism of expressing humor in different dialogues on service satisfaction through four experimental studies. Our study found that chatbots' expression of humor in chit-chat dialogues leads to higher perceived entertainment and service satisfaction for customers; however, chatbots' expression of humor in task-oriented dialogues leads to distraction and lower service satisfaction. In addition, we found that entertainment significantly mediated between humor in chit-chat dialogues and service satisfaction, while distraction had a significant indirect effect between humor in task-oriented dialogues and service satisfaction. These findings deepen our understanding of chatbot-expressed humor and provide valuable insights into online retailers’ deployment of humorous chatbots.