Lactic acid accumulation in the caecum and colon resulting from the fermentation of carbohydrates can lead to deleterious effects in ruminant and monogastric animals, including humans. In the present study, we examined the behavioural effects of two types of commonly consumed foods: soluble and fermentable carbohydrates (FCs). Thirty-six male Wistar rats were fed either a commercial rat and mouse chow, a soluble carbohydrate (SC)-based diet or an FC-based diet. Social interaction, anxiety, aggression and locomotor activity were examined by employing a social interaction test and a light/dark emergence test, while physical parameters of hindgut fermentation were examined after sacrifice, either 3 or 21 h after feeding. Results showed that anxiety (spending less time in the light compartment during the light/dark emergence test) and aggression (increased fighting during the social interaction test) were increased following raised concentrations of fermentation end products, such as lactic acid and volatile fatty acids (VFAs) in the caecum of rats. These associations occurred regardless of dopamine and 5-HT concentrations in the prefrontal cortex (PFC) and provide evidence supporting a general effect of FCs on behaviour. Possible mechanisms of action along with similarities between a rat and human model of acidosis are discussed.