This paper deals with the three-dimensional container packing problem (3DCPP), which is to pack a number of items orthogonally onto a rectangular container so that the utilization rate of the container space or the total value of loaded items is maximized. Besides the above objectives, some other practical constraints, such as loading stability, the rotation of items around the height axis, and the fixed loading (unloading) orders, must be considered for the real-life 3DCPP. In this paper, a sub-volume based simulated annealing meta-heuristic algorithm is proposed, which aims at generating flexible and efficient packing patterns and providing a high degree of inherent stability at the same time. Computational experiments on benchmark problems show its efficiency.