In this paper the authors discuss optimal control problems of a new ecological model governed by nonlinear reaction–diffusion equations. There are four major ingredients. The first is the proof of the well posedness of the solution to the state equations. The second is to prove the existence of the optimal control by using functional analysis techniques. The third ingredient is the establishment of first order necessary optimality conditions satisfied by the optimal control. The fourth ingredient is an example of optimal control problem and its numerical results that confirm the theoretical results obtained in this paper.