Assuming that the wealth process X u is generated self-financially from the given initial wealth by holding its fraction u in a risky stock (whose price follows a geometric Brownian motion with drift μ ∈ R and volatility σ > 0) and its remaining fraction 1−u in a riskless bond (whose price compounds exponentially with interest rate r ∈ R), and letting P t,x denote a probability measure under which X u takes value x at time t, we study the dynamic version of the nonlinear mean-variance optimal control problemwhere t runs from 0 to the given terminal time T > 0, the supremum is taken over admissible controls u, and c > 0 is a given constant. By employing the method of Lagrange multipliers we show that the nonlinear problem can be reduced to a family of linear problems. Solving the latter using a classic Hamilton-Jacobi-Bellman approach we find that the optimal dynamic control is given bywhere δ = (μ−r )/σ . The dynamic formulation of the problem and the method of solution are applied to the constrained problems of maximising/minimising the mean/variance subject to the upper/lower bound on the variance/mean from which the nonlinear problem above is obtained by optimising the Lagrangian itself.