We present an efficient computational procedure for the solution of bang–bang optimal control problems. The method is based on a well-known adaptive control parametrization method, which is one of the direct methods for numerical solution of optimal control problems. First, the adaptive control parametrization method is reviewed and then its advantages and disadvantages are illustrated. In order to resolve the need for a priori knowledge about the structure of optimal control and for resolving the sensitivity to an initial guess, a homotopy continuation technique is combined with the adaptive control parametrization method. The present combined method does not require any assumptions on the control structure and the number of switching points. In addition, the switching points are captured accurately; also, efficiency of the method is reported through illustrative examples.