Irritable bowel syndrome (IBS) associated with anxiety or depression is ubiquitous in clinical practice, and multiple related articles have been published. However, studies that utilize bibliometric analyses to address this topic are rare. In our study, we aimed to reveal research trends in IBS with anxiety or depression. Publications on IBS in relation to anxiety or depression in the last 20 years were obtained from the Web of Science Core Collection (WoSCC). CiteSpace software (5.8.R3) and GraphPad Prism 8 were used to perform bibliometric analysis of authors, countries, institutions, journals, keywords, and references involved in this topic. A total of 2,562 publications from 716 academic journals were included in this study. The majority of publications (n = 833, 32.51%) were from the USA, and the University of California, Los Angeles, contributed the most publications (n = 97, 3.79%). Active cooperations among countries and institutions were observed. Neurogastroenterology and Motility [impact factor (IF) 2020 = 3.598] published the most papers (170 publications, 6.64%), followed by Alimentary Pharmacology Therapeutics (IF 2020 = 8.171; 88 publications; 3.44%). The literatures related to IBS and anxiety or depression were primarily published in journals related to medicine/medical/clinical, neurology/sports/ophthalmology, and molecular/biology/immunology. Cryan JF and Drossman DA, with the largest number of articles (84 publications) and citations (917 citations), respectively, were considered as the most influential authors in this field. A total of 336 co-cited references were divided into 17 clusters, and #1 fecal microbiota transplantation contained most of the documents published in recent years. Moreover, the keyword “psychosocial factor” had the largest burst strength of 13.52, followed by the keyword “gut microbiota” with a burst strength of 11.71. This study shows the research performance of IBS related to anxiety or depression from 2002 to 2021 and helps researchers master the trend in this field, which should receive more attention.