The global optimal control problem with free system terminal states is proposed for a special class of hybrid dynamical systems, Hybrid impulsive and switching systems (HISS). The necessary condition of the above problem, the HISS' minimum principle is given. In the proof of the above theorem, the general variational method and the matrix cost functional structure expression are employed. Based on this result, a special linear HISS is illustrated and the optimal control algorithm is derived. Moreover, the cases of pure impulsive systems and pure switched systems are considered in this paper.