We study anisotropic inflation in the Brans–Dicke gravity in the presence of an abelian gauge field where the gauge field is non-minimally coupled to the inflaton. We show that the degree of anisotropy, under slow-roll approximations, is proportional to slow-roll parameter of the theory. As a demonstration, we consider the displaced quadratic potential for the inflation. We do the numerical calculation of the model to investigate the behavior of anisotropy by changing the parameter in the Brans–Dicke model. We find out that, the solution is an attractor in the phase space, and anisotropy grows with the number of e-folds. Anisotropy depends on the Brans–Dicke parameter, ω, initial values of the scalar field and constant parameter of the coupling function of the scalar field and the abelian gauge field, c. If we consider upper bound on the number of e-folds from CMB i.e. 60e-folds, by increasing ωand c, anisotropy do not have time to exit the horizon and it is suppressed.