In recent years, a new direction of research has emerged in the theory of stochastic differential equations, namely, stochastic differential equations with a fractional Wiener process. This class of processes makes it possible to describe adequately many real phenomena of a stochastic nature in financial mathematics, hydrology, biology, and many other areas. These phenomena are not always described by stochastic systems satisfying the conditions of strong mixing, or weak dependence, but are described by systems with a strong dependence, and this strong dependence is regulated by the so-called Hurst parameter, which is a characteristic of this dependence. In this article, we consider the problem of the existence of an optimal control for a stochastic differential equation with a fractional Wiener process, in which the diffusion coefficient is present, which gives more accurate simulation results. An existence theorem is proved for an optimal control of a process that satisfies the corresponding stochastic differential equation. The main result was obtained using the Girsanov theorem for such processes and the existence theorem for a weak solution for stochastic equations with a fractional Wiener process.