Algorithmic trading (AT) plays a major role in the trading activities of developed markets. This research breaks new ground by investigating how AT influences herding behaviour in stock markets. Utilising the implementation of the Markets in Financial Instruments Directive (MiFID II), we show that AT‐induced herding is quantitatively 14 times more pronounced compared to herding triggered by non‐AT elements. Algorithmic traders herd more when international volatility and market uncertainty are high, revealing a heightened sensitivity to global market signals. However, during periods of high local volatility, AT seems to disregard these fluctuations, indicating an ‘inattention effect’. AT‐induced anti‐herding is prominent in the volatile aggressive stocks, while no such behaviour is observed in the more stable defensive stocks. The findings carry critical implications for both regulators and market professionals, as we uncover dual behaviours of AT‐induced herding and anti‐herding in varying market conditions.