Barrier options are path-dependent options, and their return depends not only on the price of the underlying asset on the expiry date but also on whether the underlying asset reaches the prescribed barrier level during the contract's validity period. This paper mainly studies the barrier option pricing problem under the Ornstein–Uhlenbeck equa-tion model under an uncertain environment. Assuming that the stock price obeys the Ornstein–Uhlenbeck equation model, the pricing formulas of four European barrier options are derived. Finally, several numerical examples are used to verify the effectiveness of the model.