A numerical computation approach based on constraint aggregation and pseudospectral method is proposed to solve the optimal control of alkali/surfactant/polymer (ASP) flooding. At first, all path constraints are aggregated into one terminal condition by applying a Kreisselmeier-Steinhauser (KS) function. After being transformed into a multistage problem by control vector parameter, a normalized time variable is introduced to convert the original problem into a fixed final time optimal control problem. Then the problem is discretized to nonlinear programming by using Legendre-Gauss pseudospectral method, whose numerical solutions can be obtained by sequential quadratic programming (SQP) method through solving the KKT optimality conditions. Additionally, two adaptive strategies are applied to improve the procedure: (1) the adaptive constraint aggregation is used to regulate the parameter ρ in KS function and (2) the adaptive Legendre-Gauss (LG) method is used to adjust the number of subinterval divisions and LG points. Finally, the optimal control of ASP flooding is solved by the proposed method. Simulation results show the feasibility and effectiveness of the proposed method.