Neurotoxic plaques composed of 39 to 42 residue-long amyloid beta peptides (Aβs) are copiously present in the brains of patients with Alzheimer's disease (AD). Erythrosine B (ER), a xanthene food dye, inhibits the formation of Aβ fibrils and Aβ-associated cytotoxicity in vitro. Here, in an attempt to elucidate the inhibition mechanism, we performed molecular dynamics (MD) simulations to demonstrate the conformational change of Aβ40 induced by ER molecules in atomistic detail. During the simulation, the ER bound to the surfaces of both N-terminus and C-terminus regions of Aβ40. Our result shows that ER interacts with the aromatic side chains at the N-terminus region resulting in destabilization of the inter-chain stacking of Aβ40. Moreover, the stablility of the helical structures at the residues from 13 to 16 suggests that ER disturbs conformational transition of Aβ40. At the C-terminus region, the bound ER blocks water molecules and stabilizes the α-helical structure. Regardless of the number of ER molecules used, the interruption of the formation of the salt-bridge between aspartic acid 23 and lysine 28 occurred. To further validate our analysis, binding free energies of ER at each binding site were evaluated. The finding of stronger binding energy at the N-terminus region supports an inhibition mechanism induced by stacking interaction between ER and phenylalanine. These findings could aid present and future treatment studies for AD by clarifying the inhibition mechanism of ER on the conformational transition of Aβ40 at the molecular level.