Slab retrieving problem is an important combinatorial optimization problem in continuous casting and hot rolling. However, it has been seldom researched in literature. Therefore, a lower bound of total number of moves for the slab retrieving problem is proposed. A tree search algorithm minimizing the total number of moves is developed. The tree search algorithm includes a greedy search for an initial feasible solution and a recursive search based on compound moves. Numerous experiments and analyses show that the tree search algorithm can provide satisfactory solutions of the slab retrieving problem in relatively short running time and therefore has important theoretical meaning and practical value.