This paper investigates the attitude maneuver control problem of spacecraft actuated by two arbitrarily installed flywheels. Most of the previous studies assume that the under-actuated axis coincides with one of the inertial principal axes, while more general case is considered in this paper. When only two flywheels remain active in a redundant flywheel array, an under-actuated attitude controller is proposed based on potential function method, where the desired attitude is used to construct the attractive potential function, and the repulsive potential function is devised by considering the rotation around the under-actuated axis as an obstacle. Moreover, an arc tangent function is adopted to restrict the magnitude of control torque. Accordingly, a control parameter adaptive algorithm is then developed to ensure the stability of the system. Numerical simulations are provided at last to illustrate the effectiveness of the proposed algorithms.