This paper presents an efficient approximation schemes for the numerical solution of a fractional variational problem (FVP) and fractional optimal control problem (FOCP). As basis function for the trial solution, we employ the shifted Jacobi orthonormal polynomial. We state and derive a new operational matrix of right-sided Caputo fractional derivative of such polynomial. The new methodology of the present schemes is based on the derived operational matrix with the help of the Gauss–Lobatto quadrature formula and the Lagrange multiplier technique. Accordingly, the aforementioned problems are reduced into systems of algebraic equations. The error bound for the operational matrix of right-sided Caputo derivative is analyzed. In addition, the convergence of the proposed approaches is also included. The results obtained through numerical procedures and comparing our method with other methods demonstrate the high accuracy and powerful of the present approach.