Abstract In this article a numerical solution is presented for a class of two‐dimensional fractional‐order optimal control problems (2D‐FOOCPs) with one input and two outputs. To implement the numerical method, the Legendre polynomial basis is used with the aid of the Ritz method and the Laplace transform. By taking the Ritz method as a basic scheme into account and applying a new constructed fractional operational matrix to estimate the fractional and integer order derivatives of the basis, the given 2D‐FOOCP is reduced to a system of algebraic equations. One of the advantages of the proposed method is that it provides greater flexibility in which the given initial and boundary conditions of the problem are imposed. Moreover, satisfactory results are obtained in just a small number of polynomials order. The convergence of the method is extensively investigated and finally two illustrative examples are included to show the validity and applicability of the novel proposed technique in the current work.